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 length

`len = impzlength(b,a)`

`len = impzlength(sos)`

`len = impzlength(d)`

`len = impzlength(hs)`

`len = impzlength(___,tol)`

returns
the impulse response length for the causal discrete-time filter with
the rational system function specified by the numerator, `len`

= impzlength(`b`

,`a`

)`b`

,
and denominator, `a`

, polynomials in *z*^{–1}.
For stable IIR filters, `len`

is the effective
impulse response sequence length. Terms in the IIR filter’s
impulse response after the `len`

-th term are essentially
zero.

returns
the effective impulse response length for the IIR filter specified
by the second order sections matrix, `len`

= impzlength(`sos`

)`sos`

. `sos`

is
a *K*-by-6 matrix, where the number of sections, *K*,
must be greater than or equal to 2. If the number of sections is less
than 2, `impzlength`

considers the input to be
the numerator vector, `b`

. Each row of `sos`

corresponds
to the coefficients of a second order (biquad) filter. The *i*th
row of the `sos`

matrix corresponds to ```
[bi(1)
bi(2) bi(3) ai(1) ai(2) ai(3)]
```

.

returns
the impulse response length for the digital filter, `len`

= impzlength(`d`

)`d`

.
Use `designfilt`

to generate `d`

based
on frequency-response specifications.

specifies
a tolerance for estimating the effective length of an IIR filter’s
impulse response. By default, `len`

= impzlength(___,`tol`

)`tol`

is `5e-5`

.
Increasing the value of `tol`

estimates a shorter
effective length for an IIR filter’s impulse response. Decreasing
the value of `tol`

produces a longer effective
length for an IIR filter’s impulse response.

To compute the impulse response for an FIR filter, `impzlength`

uses the length of `b`

. For IIR filters, the function first finds the
poles of the transfer function using `roots`

.

If the filter is unstable, the length extends to the point at which the term from the
largest pole reaches 10^{6} times its original value.

If the filter is stable, the length extends to the point at which the term from the
largest-amplitude pole is `tol`

times its original amplitude.

If the filter is oscillatory, with poles on the unit circle only, then
`impzlength`

computes five periods of the slowest
oscillation.

If the filter has both oscillatory and damped terms, the length extends to the greater of these values:

Five periods of the slowest oscillation.

The point at which the term due to the largest pole is

`tol`

times its original amplitude.

`designfilt`

| `digitalFilter`

| `impz`

| `zp2sos`