LinearSystems::ComputeGain Function

Overload List

#SignatureDescription
1double ComputeGain(TVec *z, TVec *p, double Val = 1);Evaluate the gain of a zero-pole rational polynomial at a point.
2double ComputeGain(TVec *z, TVec *p, TCplx Val);Returns gain of a filter with zeroes in z and poles in p.

Overload 1: double ComputeGain(TVec *z, TVec *p, double Val = 1);

Evaluate the gain of a zero-pole rational polynomial at a point.

#NameTypeDescription
1zTVec *Zeros of the rational polynomial (may be empty; real or complex-conjugate).
2pTVec *Poles of the rational polynomial (may be empty; real or complex-conjugate).
3Val = 1doublePoint at which to evaluate; the overload taking a Double evaluates on the real axis, the TCplx overload at a complex point.

Returns: The real-valued gain as defined above.

Remarks:

Evaluates the monic zero-pole product at the value Val and returns a real number. With zeros z_1 ... z_n and poles p_1 ... p_m the rational function is H(x) = ((x-z_1)...(x-z_n))/((x-p_1)...(x-p_m)) . ((x-z1)...(x-zn))/((x-p1)...(x-pn)) Longrightarrow ((Val-z1)...(Val-zn))/((Val-p1)...(Val-pn)) = number

x - variable
z1..zn - zeros
p1..pn - poles

Because the coefficients are assumed real, the routine returns the ratio of the REAL PARTS of the two products rather than the real part of the quotient: Result = (Re[prod_i (Val-z_i)])/(Re[prod_j (Val-p_j)]) . For a real Val both products are real and this equals Re[H(Val)]; for a complex Val the two conventions differ, and this routine uses the real-part ratio above. Empty z or p contributes a unit product. The denominator must have a non-zero real part, otherwise the result is not finite.

Declared in Dew::Signal::Units::LinearSystems · Dew.Signal/Units.LinearSystems.h · Cross-compiler

Overload 2: double ComputeGain(TVec *z, TVec *p, TCplx Val);

Returns gain of a filter with zeroes in z and poles in p.

#NameTypeDescription
1zTVec *
2pTVec *
3ValTCplx
Remarks:

Val parameter defines the value at which to evaluate the rational polynomial.

Declared in Dew::Signal::Units::LinearSystems · Dew.Signal/Units.LinearSystems.h · Cross-compiler