[stepResp,t]
= stepz(sysobj)
computes the step response of the filter System object™ and returns the response in the column vector stepResp,
and a vector of times (or sample intervals) in t, where t = [0
1 2 ...k-1]'. k is the number of filter coefficients.
[stepResp,t]
= stepz(sysobj,n)
computes the step response at floor(n) 1-second intervals. The time
vector t equals (0:floor(n)-1)'.
[stepResp,t]
= stepz(sysobj,n,fs)
computes the step response at floor(n) 1/fs-second
intervals. The time vector t equals
(0:floor(n)-1)'/fs.
[stepResp,t]
= stepz(sysobj,[],fs)
computes the step response at k 1/fs-second
intervals, where k is the number of filter coefficients. The time vector
t equals (0:k-1)'/fs.
[___]
= stepz(___,'Arithmetic',arithType)
analyzes the filter System object based on the arithmetic specified in arithType using any
one of the previous syntaxes.
Design an equiripple lowpass FIR filter and compute the step response of the filter.
Use the fdesign.lowpass specification object to define the filter specifications. Run the design function on the specification object to create a dsp.FIRFilter object. Specify the passband frequency to be 20 kHz, stopband frequency to be 22.05 kHz, passband ripple to be 1 dB, and the stopband attenuation to be 80 dB. Specify the sampling frequency to be 96 kHz.
n — Length of step response vector positive integer
Length of the step response vector, specified as a positive integer.
Data Types: single | double
fs — Sampling frequency 1 (default) | positive scalar
Sampling frequency used in computing the step response, specified as a positive
scalar.
Data Types: single | double
arithType — Arithmetic type 'double' (default) | 'single' | 'Fixed'
Arithmetic used in the filter analysis, specified as 'double',
'single', or 'Fixed'. When the arithmetic
input is not specified and the filter System object is unlocked, the analysis tool assumes a double-precision filter. When the
arithmetic input is not specified and the System object is locked, the function performs the analysis based on the data type of
the locked input.
The 'Fixed' value applies to filter System objects with fixed-point
properties only.
When the 'Arithmetic' input argument is specified as
'Fixed' and the filter object has the data type of the
coefficients set to 'Same word length as input', the arithmetic
analysis depends on whether the System object is unlocked or locked.
unlocked –– The analysis object function cannot determine the coefficients
data type. The function assumes that the coefficients data type is signed,
has a 16-bit word length, and is auto scaled. The function performs
fixed-point analysis based on this assumption.
locked –– When the input data type is 'double' or
'single', the analysis object function cannot
determine the coefficients data type. The function assumes that the data
type of the coefficients is signed, has a 16-bit word length, and is auto
scaled. The function performs fixed-point analysis based on this
assumption.
To check if the System object is locked or unlocked, use the isLocked function.
When the arithmetic input is specified as 'Fixed' and the filter
object has the data type of the coefficients set to a custom numeric type, the object
function performs fixed-point analysis based on the custom numeric data type.
Step response, returned as an n-element vector. If
n is not specified, the length of the step response vector equals
the number of coefficients, k in the filter.
Data Types: double
t — Time vector vector
Time vector of length n in seconds. The vector
t consists of n equally spaced points in the
range (0:floor(n)-1)'/fs. If n is not specified,
the function uses the number of coefficients k in the
filter.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.