The function determines the coefficients c of a polynomial of degree n from its root vector r.
c_0 + c_1*x + c_2*x^2 + ... + c_n*x^n.
The resulting n+1 coefficients are c[k, :], k=1 .. n+1, normalised such that the highest coefficient is one.
c[n+1, :] = {1, 0} c[k, 1]: real part c[k, 2]: imaginary part
Real[3,2] r=[1,0;2,0;3,0]; Real[4,2] c; algorithm c := PowerSystems.pu.Functions.polyCoef(r);
The resulting n+1 = 4 coefficients are:
c = [-6, 0; 11, 0; -6, 0; 1, 0];
See also polyCoefReal, polyRoots
function polyCoef extends Modelica.Icons.Function; input Real[:, 2] r "root vector, 2nd index=1:2, real and imaginary part"; output Real[size(r, 1) + 1, 2] c "coefficient vector, 2nd index=1:2, real and imaginary part"; end polyCoef;