stepplot - Plot step response of LTI systems and return plot handle

Syntax

h = stepplot(sys)
stepplot(sys,Tfinal)
stepplot(sys,t)
stepplot(sys1,sys2,...,t)
stepplot(AX,...)
stepplot(..., plotoptions)

Description

h = stepplot(sys) plots the step response of the LTI model sys (created with either tf, zpk, or ss). It also returns the plot handle h. You can use this handle to customize the plot with the getoptions and setoptions commands. Type

help timeoptions 

for a list of available plot options.

For multiinput models, independent step commands are applied to each input channel. The time range and number of points are chosen automatically.

stepplot(sys,Tfinal) simulates the step response from t=0 to the final time t=Tfinal. For discrete-time models with unspecified sampling time, Tfinal is interpreted as the number of samples.

stepplot(sys,t) uses the user-supplied time vector t for simulation. For discrete-time models, t should be of the form Ti:Ts:Tf, where Ts is the sample time. For continuous-time models, t should be of the form Ti:dt:Tf, where dt becomes the sample time for the discrete approximation to the continuous system. The step input is always assumed to start at t=0 (regardless of Ti).

stepplot(sys1,sys2,...,t) plots the step responses of multiple LTI models sys1,sys2,... on a single plot. The time vector t is optional. You can also specify a color, line style, and marker for each system, as in

stepplot(sys1,'r',sys2,'y--',sys3,'gx')

stepplot(AX,...) plots into the axes with handle AX.

stepplot(..., plotoptions) plots the step response with the options specified in plotoptions. Type

help timeoptions 

for more details.

Remarks

You can change the properties of your plot, for example the units. For information on the ways to change properties of your plots, see Ways to Customize Plots.

Example

Use the plot handle to normalize the responses on a step plot.

sys = rss(3);
h = stepplot(sys);
% Normalize responses.
setoptions(h,'Normalize','on');

See Also

getoptions, setoptions, step

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS