impulse (Control Design and Simulation Module, MathScript Function)
Member of the timeresp class.
Syntax
impulse(SysIn, attributes)
impulse(SysIn, attributes, t)
[Y, T, X] = impulse(SysIn)
[Y, T, X] = impulse(SysIn, t)
Description
Creates an impulse response plot of a system model. You also can use this function to return the impulse response of the model outputs. If the model is in state-space form, you also can use this function to return the impulse response of the model states. If you do not specify an output, this function creates a plot.
Inputs
Name | Description | ||||||||||||||||||||||||||||||||
SysIn | Specifies a linear time-invariant (LTI) model in transfer function, zero-pole-gain, or state-space form. | ||||||||||||||||||||||||||||||||
attributes | Specifies valid plot attributes. Order the plot attributes by color, point-style, and line-style. For example, 'bo-' specifies that the plot is blue, marks points with circles, and uses solid lines. attributes is a string that can take a combination of the following values:
|
||||||||||||||||||||||||||||||||
t | Specifies a uniformly spaced time vector that contains information about the initial time, time step, and final time. You can format t as [t0:dt:tf], where t0 is the initial time, dt is the time step, and tf is the final time. You also can format t as [tf]. You also can use the linspace function to generate t. t is a real vector. |
Outputs
Name | Description |
Y | Returns the time response of the outputs of the SysIn model due to an impulse input. Y is a real matrix. |
T | Returns the uniformly spaced time vector this function uses to calculate the impulse response and the state trajectories. T is a real vector. |
X | Returns the time response of the states of the SysIn model due to an impulse input. X is a real matrix. |
Examples
SysIn = zpk([1], [-1, -2], 0.5)
impulse(SysIn, 'rx-', [0:0.1:10])