Signal Processing Toolbox Previous page   Next Page
zerophase

Zero-phase response of a digital filters

Syntax

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.

[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,'whole') returns the zero-phase response 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.

Examples

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


Previous page  yulewalk zp2sos Next page

© 1994-2005 The MathWorks, Inc.