y = Polynomial.evaluateComplex(p, x);
Evaluate a polynomial p
at a given
Complex abszissa value x
.
import Modelica_LinearSystems2.Math.Polynomial; x = Polynomial.x(); p1 = -6*x^2 + 4*x -3; Polynomial.evaluateComplex(p1, Complex(2, 3)); // 35 - 60*j
encapsulated function evaluateComplex import Complex; import Modelica_LinearSystems2.Math.Polynomial; input Polynomial p "Polynomial to be evaluated"; input Complex x "Complex abszissa value"; output Complex y "Complex value of polynomial at x"; end evaluateComplex;