This example shows how to obtain a step response and step response data for a discrete-time dynamic system model.
You can use the techniques of this example with commands such
initialpot to obtain time-domain responses
of discrete-time models. Obtaining time-domain responses of discrete-time
models is the same as for continuous-time models, except that the
time sample points are limited by the sample time
Create a discrete-time transfer function model and plot its response to a step input at t = 0.
H = tf([-0.06,0.4],[1,-1.6,0.78],0.1); stepplot(H)
For discrete-time models,
the response at multiples of the sample time, assuming a hold between
Compute the step response of
0.5 and 2.5 seconds.
[y,t] = step(H,0.5:0.1:2.5);
When you specify a time vector for the response of a discrete-time
model, the time step must match the sample time
the discrete-time model. The vector
the time points between 0.5 and 2.5 seconds, at multiples of the sample
H, 0.1 s. The vector
the corresponding step response values.