Signal Processing Toolbox
  Go to function:
    Search    Help Desk 
impz    Examples   See Also

Impulse response of digital filters.

Syntax

Description

[h,t] = impz(b,a) computes the impulse response of the filter with numerator coefficients b and denominator coefficients a. impz chooses the number of samples and returns the response in column vector h and times (or sample intervals) in column vector t (where t = (0:n-1)' and n is the computed impulse response length).

[h,t] = impz(b,a,n) computes n samples of the impulse response. If n is a vector of integers, impz computes the impulse response at those integer locations where 0 is the starting point of the filter.

[h,t] = impz(b,a,n,Fs) computes n samples and scales t so that samples are spaced 1/Fs units apart. Fs is 1 by default. Leave n empty, [], to let impz select the number of samples.

impz with no output arguments plots the impulse response in the current figure window using stem(t,h).

impz works for both real and complex input systems.

Example

Plot the first 50 samples of the impulse response of a fourth-order lowpass elliptic filter with cutoff frequency of 0.4 times the Nyquist frequency:

Algorithm

impz filters a length n impulse sequence using

To compute n in the auto-length case, impz either uses n = length(b) for the FIR case or first finds the poles using p = roots(a), if length(a) is greater than 1.

If the filter is unstable, n is chosen to be the point at which the term from the largest pole reaches 10^6 times its original value.

If the filter is stable, n is chosen to be the point at which the term due to the largest amplitude pole is 5*10^-5 of its original amplitude.

If the filter is oscillatory (poles on the unit circle only), impz computes five periods of the slowest oscillation.

If the filter has both oscillatory and damped terms, n is chosen to equal five periods of the slowest oscillation or the point at which the term due to the largest (nonunity) amplitude pole is 5*10^-5 of its original amplitude, whichever is greater.

impz also allows for delay in the numerator polynomial, which it adds to the resulting n.

See Also

impulse
Unit impulse response (see Control System Toolbox User's Guide).
stem
Plot discrete sequence data (see the online MATLAB Function Reference).


[ Previous | Help Desk | Next ]