| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Filter Design Toolbox |
| Contents | Index |
| Learn more about Filter Design Toolbox |
[h,t] = impz(ha)
[h,t] = impz(...,fs)
impz(ha,...)
[h,t] = impz(hd)
impz(hd)
[h,t] = impz(hm)
impz(hm)
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.
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.
[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.
[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.
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. |
Create a discrete-time filter for a fourth-order, low-pass 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.
% Create a design object for the prototype filter.
d = fdesign.lowpass(.4,.5,1,80)
d =
Response: 'Minimum-order lowpass'
Specification: 'Fp,Fst,Ap,Ast'
Description: {4x1 cell}
NormalizedFrequency: true
Fs: 'Normalized'
Fpass: 0.4000
Fstop: 0.5000
Apass: 1
Astop: 80
Use ellip to design the discrete-time filter in second-order section form, with minimum-order.
hd=design(d,'ellip')
hd =
FilterStructure: 'Direct-Form II, Second-Order Sections'
Arithmetic: 'double'
sosMatrix: [4x6 double]
ScaleValues: [5x1 double]
ResetBeforeFiltering: 'on'
States: [2x4 double]Convert hd to fixed-point and check the impulse response hd.arithmetic = 'fixed';
impz(hd)

![]() | iirshiftc | info | ![]() |

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |