Calculate number of real poles
function numberOfRealPoles import Modelica_LinearSystems2.Internal; import Modelica_LinearSystems2.Math.Polynomial; input Modelica_LinearSystems2.DiscreteTransferFunction dtf "TransferFunction"; output Integer result = Internal.numberOfRealZeros(Polynomial.roots(Polynomial(dtf.d))); end numberOfRealPoles;