impz
Compute the impulse response of a digital filter.
Syntax
[x,t] = impz(b,a)
[x,t] = impz(b,a,n)
[x,t] = impz(b,a,n,fs)
[x,t] = impz(b,a,[],fs)
impz(...)
Inputs
- b
- The numerator polynomial coefficients of the filter.
- a
- The denominator polynomial coefficients of the filter.
- n
- The number of response samples to produce. Omit or use [] to allow the function to determine an appropriate number.
- fs
- The sampling frequency (in Hz).
Outputs
- x
- The impulse response.
- t
- The time vector for the response.
Example
Verify the impulse response of a fourth order Butterworth low pass digital filter with a 300 Hz cutoff frequency and a 2000 Hz sampling frequency.
[b,a] = butter(4, 300/(2000/2));
impz(b,a,300,2000);
Comments
If the output arguments are omitted, the function will plot the results.
When defaulted, n will be chosen so that an attenuation of at least 120 dB is displayed for a stable filter, and amplification of at least 120 dB for an unstable filter, or at least five cycles for a marginally stable filter.