Given [p^2,p] and [p] coefficients, transform to normalized form with highest power of p equal 1

function filterToNormalized input Real c1[:] "[p] coefficients of polynomials (c1[i]*p + 1)"; input Real c2[:, 2] "[p^2, p] coefficients of polynomials (c2[i,1]*p^2 + c2[i,2]*p + 1)"; output Real n1[size(c1, 1)] "[p^0] coefficients of polynomials c1[i]*(p+1/c1[i])"; output Real n2[size(c2, 1), 2] "[p, p^0] coefficients of polynomials c2[i,1]*(p^2 + (c2[i,2]/c2[i,1])*p + (1/c2[i,1]))"; output Real k "Gain (product(1/c1[i])*(1/c2[i,1])"; end filterToNormalized;

Generated at 2024-10-14T18:25:21Z by OpenModelicaOpenModelica 1.24.0 using GenerateDoc.mos