control.matlab.step

control.matlab.step(sys, T=None, input=0, output=None, return_x=False)[source]

Step response of a linear system.

If the system has multiple inputs or outputs (MIMO), one input has to be selected for the simulation. Optionally, one output may be selected. If no selection is made for the output, all outputs are given. The parameters input and output do this. All other inputs are set to 0, all other outputs are ignored.

Parameters:
sysStateSpace or TransferFunction

LTI system to simulate.

Tarray_like or number, optional

Time vector, or simulation time duration if a number (time vector is autocomputed if not given).

inputint

Index of the input that will be used in this simulation.

outputint

If given, index of the output that is returned by this simulation.

return_xbool, optional

If True, return the state vector in addition to outputs.

Returns:
youtarray

Response of the system.

Tarray

Time values of the output.

xoutarray (if selected)

Individual response of each x variable.

See also

lsim, initial, impulse

Examples

>>> from control.matlab import step, rss
>>> G = rss(4)
>>> yout, T = step(G)