Signal Processing Toolkit User Guide > Reference (A to F) > FREQRESP_S Function (PV-WAVE Extreme Advantage)
  

FREQRESP_S Function (PV-WAVE Extreme Advantage)
Evaluates the frequency response of an analog filter for a given set of points on the complex plane using Horner’s method.
Usage
result = FREQRESP_S(h, pts)
Input Parameters
h—An analog filter structure. This analog filter is expected to be a rational polynomial in positive powers of s.
pts—One or more points. (Most likely a complex array; however, this parameter may also be a scalar, a float, or an integer array.)
Returned Value
result—The value of filter h = H(s) at a given set of points s on the complex plane (si = (xi + jyi)). The dimension of result is the same as the input parameter pts.
Keywords
None.
Discussion
FREQRESP_S uses Horner’s method to evaluate the numerator and denominator polynomials at each point in the input array, and then divides the results. Floating underflow and overflow cause the usual error messages.
The most common use of FREQRESP_S is to determine the frequency response of an analog transfer function. This is accomplished by evaluating s = jω for values of the real variable ω.
Example
This example computes the frequency response of a first order analog lowpass filter, H(s) = 0.5/(s + 0.5). The results are shown in Frequency Response Plot of First Order Analog Lowpass Filter.
b = 0.5
a = [0.5, 1]
h = FILTSTR(b, a)
omega = COMPLEX(FLTARR(100), 5.*INDGEN(100)/99.)
PLOT, ABS(omega), ABS(FREQRESP_S(h, omega)
 
Figure 2-13: Frequency Response Plot of First Order Analog Lowpass Filter
See Also
FILTSTR,   FREQRESP_Z

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.