Filter impulse response
[h,t] = impz(hfilt,n)
[h,t] = impz(hfilt,n,fs)
[h,t] = impz(hfilt,,fs)
[h,t] = impz(hs)
[h,t] = impz(hs,Name,Value)
impz returns the impulse response based
on the current filter coefficients. This section describes common
with discrete-time filters, multirate filters, and filter System objects.
For more input options, refer to
impz in Signal Processing Toolbox™ documentation.
[ returns the impulse
h and the corresponding time points
which the impulse response of
hfilt is computed.
The impulse response is evaluated at 10 1-second intervals—
[ returns the impulse response
for the filter System object™
hs. The impulse
response is evaluated at 10 1-second intervals—
You can also provide the optional input arguments
impz(hs) uses FVTool to
plot the impulse response of the filter System object
You can use
The multirate filter impulse response is computed relative to
the rate at which the filter is running. When you specify
For multistage cascades,
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. In this case, an equivalent single-stage
filter exists with an overall interpolation factor of 8.
Filter System object.
The following Filter System objects are supported by this analysis function:
Number of samples.
Specify optional comma-separated pairs of
Name is the argument
Value is the corresponding
Name must appear
inside single quotes (
You can specify several name and value pair
arguments in any order as
'Arithmetic'— Value types:
For filter System object inputs only, specify the arithmetic
used during analysis. When you specify
the function performs double- or single-precision analysis. When you
'fixed' , the arithmetic changes depending
on the setting of the
and whether the System object is locked or unlocked.
When you do not specify the arithmetic for non-CIC structures, the function uses double-precision arithmetic if the filter System object is in an unlocked state. If the System object is locked, the function performs analysis based on the locked input data type. CIC structures only support fixed-point arithmetic.
Time vector of length
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.
ellip to design a minimum
order discrete-time filter in second-order section form.
Convert hd to fixed-point, and plot the impulse response:
impz(hd); axis([1 75 -0.2 0.35])