Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Impulse response of digital filter

`[h,t] = impz(b,a)`

`[h,t] = impz(sos)`

`[h,t] = impz(d)`

`[h,t] = impz(___,n)`

`[h,t] = impz(___,n,fs)`

`impz(___)`

`[`

returns the impulse response of the digital filter `h`

,`t`

] = impz(`d`

)`d`

. Use `designfilt`

to
generate `d`

based on frequency-response specifications.

`impz(___)`

with no output arguments plots the impulse
response of the filter.

`impz`

filters a length-`n`

impulse sequence
using

filter(b,a,[1 zeros(1,n-1)])

and plots the result using `stem`

.

If the input to `impz`

is single precision, the function computes the
impulse response using single-precision arithmetic and returns single-precision
output.

When `impz`

calculates `n`

automatically, the
algorithm depends on the properties of the filter:

FIR filters —

`n`

is the length of`b`

.IIR filters —

`impz`

first finds the poles of the transfer function using`roots`

.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 as the point at which the term from the largest-amplitude pole is 5 × 10^{–5}times its original amplitude.If the filter is oscillatory with 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 the greater of five periods of the slowest oscillation, or the point at which the term due to the largest pole is 5 × 10^{–5}times its original amplitude.

`impz`

also allows for delays in the numerator polynomial. The number
of delays is incorporated into the computation of the number of samples.

`designfilt`

| `digitalFilter`

| `impulse`

| `impzlength`

| `stem`