FREQRESP_Z Function
Evaluates the frequency response of a digital filter on the unit circle.
Usage
result = FREQRESP_Z(h[, npoints])
Input Parameters
h—A digital filter structure.
npoints—(optional) The number of equally spaced points on the unit circle. (Default: npoints = 512)
Returned Value
result—The value of the transfer function H(z) evaluated at a set of frequency points:
Keywords
Infreq—One or more real values indicating the normalized frequencies at which the function is evaluated.
Outfreq—If set, returns an array of normalized frequencies at which the transfer function was evaluated.
Slow—If present and nonzero, FREQRESP_Z evaluates the numerator and the denominator at each point instead of performing the FFT.
 
note
If Slow is set, FREQRESP_Z will not perform the FFT, even when the FFT would normally be used.
Discussion
FREQRESP_Z evaluates the digital transfer function:
H(z) = B(z)/A(z)
at a set of points:
If an empty variable is used with the Outfreq keyword, as in the command
response = FREQRESP_Z(h, Outfreq = freq)
the values of the normalized frequencies will be passed back into the variable specified by the keyword Outfreq.
If Infreq is set to a scalar or array, those normalized frequencies fk are used to generate zk values. If Infreq  isn’t set but npoints is, FREQRESP_Z  generates that number of evenly spaced points (z values) around the top half of the unit circle. If neither keyword is used, the default value of 512 evenly spaced points is generated (around the top half of the unit circle).
If Infreq or Slow is used, the generated values and the filter structure H, are passed to FREQRESP_S and the results are returned.
Example
In this example, FREQRESP_Z is used to evaluate the frequency response of a lowpass filter (Figure 2-14: Frequency Response Plot of Lowpass Filter).
h = IIRDESIGN(10, .5, /Butter)
response = FREQRESP_Z(h, Outfreq = f)
PLOT, f, ABS(response)
 
Figure 2-14: Frequency Response Plot of Lowpass Filter
See Also