Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double ComputeGain(TVec *z, TVec *p, double Val = 1); | Evaluate the gain of a zero-pole rational polynomial at a point. |
| 2 | double 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.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | z | TVec * | Zeros of the rational polynomial (may be empty; real or complex-conjugate). |
| 2 | p | TVec * | Poles of the rational polynomial (may be empty; real or complex-conjugate). |
| 3 | Val = 1 | double | Point 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.
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.