Subtract two transfer functions (tf1 - tf2)
function subtract import Modelica_LinearSystems2.Math.Polynomial; import Modelica_LinearSystems2.TransferFunction; input TransferFunction tf1; input TransferFunction tf2; output TransferFunction result = (Polynomial(tf1.n)*Polynomial(tf2.d) - Polynomial(tf2.n)*Polynomial(tf1.d))/(Polynomial(tf1.d)*Polynomial(tf2.d)); end subtract;