stepz

Step response for filter

Syntax

[h,t] = stepz(hfilt)
[h,t] = stepz(hfilt,n)
[h,t] = stepz(hfilt,n,fs)
[h,t] = stepz(hfilt,[],fs)
stepz(hfilt)
[h,t] = stepz(hs)
[h,t] = stepz(hs,Name,Value)
stepz(hs)

Description

stepz returns the step response based on the current filter coefficients. This section describes common stepz operation with adaptive filters, discrete-time filters, multirate filters, and filter System objects. For more input options, refer to stepz in Signal Processing Toolbox™ documentation.

[h,t] = stepz(hfilt) returns the impulse response h and the corresponding time points w at which the step response of hfilt is computed. The step response is evaluated at 10 1-second intervals—(0:9)'.

[h,t] = stepz(hfilt,n) returns the step response evaluated at floor(n) 1-second intervals—(0:floor(n)-1)'.

[h,t] = stepz(hfilt,n,fs) returns the step response evaluated at floor(n) 1/fs-second intervals—(0:floor(n)-1)'/fs.

[h,t] = stepz(hfilt,[],fs) returns the step response evaluated at 10 1/fs-second intervals—(0:9)'/fs.

stepz(hfilt) uses FVTool to plot the step response of the filter. You can also provide the optional input arguments n and fs with this syntax.

[h,t] = stepz(hs) returns the step response for the filter System object™ hs. The impulse response is evaluated at 10 1-second intervals—(0:9)'. You can also provide the optional input arguments n and fs with this syntax.

[h,t] = stepz(hs,Name,Value) returns an step response with additional options specified by one or more Name,Value pair arguments.

stepz(hs) uses FVTool to plot the step response of the filter System object hs.

    Note   stepz works for both real and complex filters. When you omit the output arguments, stepz plots only the real part of the step response.

Input Arguments

expand all

hfilt

hfilt is either:

  • An adaptive adaptfilt, discrete-time dfilt, or multirate mfilt filter object

  • A vector of adaptive, discrete-time, or multirate filter objects

The multirate filter step response is computed relative to the rate at which the filter is running. When you specify fs (the sampling rate) as an input argument, stepz assumes the filter is running at that rate.

For multistage cascades, stepz forms a single-stage multirate filter that is equivalent to the cascade. It then computes the response relative to the rate at which the equivalent filter is running. stepz does not support all multistage cascades. The function analyzes only those cascades for which there exists an equivalent single-stage filter.

As an example, consider a 2-stage interpolator where the first stage has an interpolation factor of 2 and the second stage has an interpolation factor of 4. In this case, an equivalent single-stage filter exists with an overall interpolation factor of 8. stepz uses this equivalent filter for the analysis. If a sampling frequency fs is specified as an input argument to stepz, the function interprets fs as the rate at which the equivalent filter is running.

hs

Filter System object.

The following Filter System objects are supported by this analysis function:

Filter System objects
dsp.FIRFilter
dsp.FIRInterpolator
dsp.CICInterpolator
dsp.FIRDecimator
dsp.CICDecimator
dsp.FIRRateConverter
dsp.BiquadFilter
dsp.IIRFilter
dsp.AllpoleFilter
dsp.AllpassFilter
dsp.CoupledAllpassFilter

n

Number of samples.

Default: 10

fs

Sampling frequency.

Default: 1

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'Arithmetic' — Value types:‘double' | 'single' | 'fixed'

For filter System object inputs only, specify the arithmetic used during analysis. When you specify 'double' or 'single', the function performs double- or single-precision analysis. When you specify 'fixed' , the arithmetic changes depending on the setting of the CoefficientDataType property and whether the System object is locked or unlocked.

 Details for Fixed-Point Arithmetic

When you do not specify the arithmetic for non-CIC structures, the function uses double-precision arithmetic if the filter System object is in an unlocked state. If the System object is locked, the function performs analysis based on the locked input data type. CIC structures only support fixed-point arithmetic.

Output Arguments

h

Complex, n-element step response vector. If hfilt is a vector of filters, h is a complex, length(hfilt)-by-n matrix of step response vectors corresponding to each filter in hfilt. If n is not specified, the function uses a default value of 8192.

For adaptive filters, h is the instantaneous step response.

t

Time vector of length n, in seconds. t consists of n points equally spaced from 0 to floor(n)/fs. If n is not specified, the function uses a default value of 10. If fs is not specified, the function uses a default value of 1.

See Also

|

Was this topic helpful?