Y = Polynomial.evaluateMatrix(p, X);
Evaluates the given polynomial p of order n with its coefficients ci so that
Y = p.c[1]*X^n + p.c[2]*X^(n-1) + ... + p.c[n]*X + p.c[n+1]*I
The matrix X must be square. Horner's method is used for polynomial evaluation.
encapsulated function evaluateMatrix import Modelica_LinearSystems2.Math.Polynomial; input Polynomial p "Polynomial to be evaluated"; input Real X[:, size(X, 1)] "Square matrix argument"; output Real Y[size(X, 1), size(X, 2)] "Value of polynomial at X"; end evaluateMatrix;