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