Vous êtes sur la page 1sur 3

impz :: Functions (Filter Design Toolbox)

jar:file:///G:/PROGRAM%20FILE/MATLAB%20R21010a/help/toolbox/...

impz
Filter impulse response

Syntax
[h,t] = impz(ha) [h,t] = impz(...,fs) impz(ha,...) [h,t] = impz(hd) impz(hd) [h,t] = impz(hm) impz(hm)

Description
The next sections describe common impz operation with adaptive, discrete-time, and multirate filters. For more input options, refer to impz in Signal Processing Toolbox documentation. Adaptive Filters Discrete-Time Filters Multirate Filters

Adaptive Filters
For adaptive filters, impz returns the instantaneous impulse response based on the current filter coefficients. [h,t] = impz(ha) computes the instantaneous impulse response of the adaptive filter ha choosing the number of samples for you, and returns the response in column vector h and a vector of times or sample intervals in t where (t = [0 1 2...]'). [h,t] = impz(...,fs) returns a matrix h if ha is a vector. Each column of the matrix corresponds to one filter in the vector. When ha is a vector of adaptive filters, impz returns the matrix h. Each column of h corresponds to one filter in the vector ha. If you provide a sampling frequency fs as an input argument, impz uses fs in when determining the impulse response. impz(ha,...) uses FVTool to plot the impulse response of the adaptive filter ha. If ha is a vector of filters, impz plots the response and for each filter in the vector.

Discrete-Time Filters
[h,t] = impz(hd) computes the instantaneous impulse response of the discrete-time filter hd choosing the number of samples for you, and returns the response in column vector h and a vector of times or sample intervals in t where (t = [0 1 2...]'). impz returns a matrix h if hd is a vector. Each column of the matrix corresponds to one filter in the vector. When hd is a vector of discrete-time filters, impz returns the matrix h. Each column of h corresponds to one filter in the vector hd. impz(hd) uses FVTool to plot the impulse response of the discrete-time filter hd. If hd is a vector of filters, impz plots the response and for each filter in the vector.

Multirate Filters
[h,t] = impz(hm) computes the instantaneous impulse response of the multirate filter hm choosing the number of samples for you, and returns the response in column vector h and a vector of times or sample intervals in t where (t = [0 1 2...]'). [h,t] = impz(hm) returns a matrix h if hm is a vector. Each column of the matrix corresponds to one filter in the vector. When hm is a vector of multirate filters, impz returns the matrix h. Each column of h corresponds to one filter in the vector ha. impz(hm) uses FVTool to plot the impulse response of the multirate filter hm. If ha is a vector of filters, impz plots the response and for each filter in the vector. Note that the multirate filter impulse response is computed relative to the rate at which the filter is running. When you specify fs (the sampling rate) as an input argument, impz assumes the filter is running at that rate. For multistage cascades, impz forms a single-stage multirate filter that is equivalent to the cascade and computes the response relative to the rate at which the equivalent filter is running. impz does not support all multistage cascades. Only cascades for which it is possible to derive an equivalent single-stage filter are allowed for analysis. As an example, consider a 2-stage interpolator where the first stage has an interpolation factor of 2 and the second stage has an interpolation factor of 4. An equivalent single-stage filter with an overall interpolation factor of 8 can be found. impz uses the equivalent filter for the analysis. If a sampling frequency fs is specified as an input argument to impz, the function interprets fs as the rate at which the equivalent filter is running.

1 of 3

2013-01-18 11:07 AM

impz :: Functions (Filter Design Toolbox)

jar:file:///G:/PROGRAM%20FILE/MATLAB%20R21010a/help/toolbox/...

Note impz works for both real and complex filters. When you omit the output arguments, impz plots only the real part of the impulse response.

Examples
Create a discrete-time filter for a fourth-order, lowpass elliptic filter with a cutoff frequency of 0.4 times the Nyquist frequency. Use a second-order sections structure to resist quantization errors. Plot the first 50 samples of the impulse response, along with the reference impulse response. d = fdesign.lowpass(.4,.5,1,80); % Create a design object for the prototype filter. Use ellip to design a minimum order discrete-time filter in second-order section form. hd=design(d,'ellip'); Convert hd to fixed-point and plot the impulse response: impz(hd); axis([1 75 -0.2 0.35])

See Also
filter
Was this topic helpful?

Yes

No

2 of 3

2013-01-18 11:07 AM

impz :: Functions (Filter Design Toolbox)

jar:file:///G:/PROGRAM%20FILE/MATLAB%20R21010a/help/toolbox/...

1984-2010 The MathWorks, Inc.

Terms of Use Patents Trademarks Acknowledgments

3 of 3

2013-01-18 11:07 AM

Vous aimerez peut-être aussi