result = Polynomial.degree(p);
This function computes the order of a Polynomial p.
import Modelica_LinearSystems2.Math.Polynomial; Polynomial p = Polynomial({0,0,2,1}); // 2*x + 1 Polynomial.degree(p) // = 1
encapsulated function degree import Modelica_LinearSystems2.Math.Polynomial; input Polynomial p; output Integer result "Degree of polynomial p"; end degree;