# stepz

Step response of digital filter

## Syntax

## Description

`stepz(___)`

with no output arguments plots the step
response of the filter. If you input a `digitalFilter`

, the step response is displayed in **FVTool**.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

`stepz`

filters a length `n`

step sequence using

filter(b,a,ones(1,n))

and plots the results using `stem`

.

To compute `n`

in the auto-length case, `stepz`

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), `stepz`

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 pole
of largest nonunit amplitude is 5 × 10^{–5} times its original amplitude, whichever is greater.

`stepz`

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

## Extended Capabilities

## Version History

**Introduced before R2006a**

## See Also

`designfilt`

| `digitalFilter`

| `freqz`

| `grpdelay`

| `impz`

| `phasez`

| `zplane`