frequencyResponseGain(A, B, C, D, Zeros, Poles)
Compute the gain of a frequency response based on zeros and poles. The system must be a SISO system, i.e. size(D, 1) = size(D, 2) = 1.
encapsulated function frequencyResponseGain extends Modelica.Icons.Function; import Modelica; import Modelica_LinearSystems2.Internal; input Real A[:, size(A, 1)] "A-matrix of linear state space system"; input Real B[size(A, 1), :] "B-matrix of linear state space system"; input Real C[:, size(A, 1)] "C-matrix of linear state space system"; input Real D[size(C, 1), size(B, 2)] "D-matrix of linear state space system"; input Real Zeros[:, 2] "Zeros of state space system as Real matrix (first column: real, second column imaginary values)"; input Real Poles[:, 2] "Poles of state space system as Real matrix (first column: real, second column imaginary values)"; output Real gain "y(s) = gain*(s-z1)*(s-z2)*...*(s-zm)/((s-p1)*(s-p2)*...(s-pn))"; end frequencyResponseGain;