| Signal Processing Toolbox | ![]() |
Zero-phase response of a digital filters
Syntax
[Hr,w] = zerophase(b,a)
[Hr,w] = zerophase(b,a,nfft)
[Hr,w] = zerophase(b,a,nfft,'whole')
[Hr,w] = zerophase(b,a,w)
[Hr,f] = zerophase(...,fs)
[Hr,w,phi] = zerophase(...)
zerophase(...)
Description
[Hr,w] = zerophase(b,a)
returns the zero-phase response Hr, and the frequency vector w (in radians/sample) at which Hr is computed, given a filter defined by numerator b and denominator a. For FIR filters where a=1, you can omit the value a from the command. The zero-phase response is evaluated at 512 equally spaced points on the upper half of the unit circle.
The zero-phase response, Hr(w), is related to the frequency response, H(w) by
,
where
is the frequency response, Hr(
) is the zero-phase response and
(w) is the continuous phase.
| Note The zero-phase response is always real, but it is not the equivalent of the magnitude response. The former can be negative while the latter cannot be negative. |
[Hr,w] = zerophase(b,a,nfft)
returns the zero-phase response Hr and frequency vector w (radians/sample), using nfft frequency points on the upper half of the unit circle.
[Hr,w] = zerophase(b,a,nfft,' returns the zero-phase response whole')
Hr and frequency vector w (radians/sample), using nfft frequency points around the whole unit circle.
[Hr,w] = zerophase(b,a,w)
returns the zero-phase response Hr and frequency vector w (radians/sample) at frequencies in vector w.
[Hr,f] = zerophase(...,fs)
returns the zero-phase response Hr and frequency vector f (Hz), using the sampling frequency fs (in Hz), to determine the frequency vector f (in Hz) at which Hr is computed.
[Hr,w,phi] = zerophase(...)
returns the zero-phase response Hr, frequency vector w (rad/sample), and the continuous phase component, phi. (Note that this quantity is not equivalent to the phase response of the filter when the zero-phase response is negative.)
zerophase(...)
with no output arguments, plots the zero-phase response versus frequency.
Example 1
Plot the zero-phase response of a constrained least squares FIR filter:
Example 2
Plot the zero-phase response of an elliptic filter:
See Also
freqs, freqz, fvtool, grpdelay, invfreqz, phasedelay, phasez
| yulewalk | zp2sos | ![]() |
© 1994-2005 The MathWorks, Inc.