| Control System Toolbox | ![]() |
Compute initial condition responses and return plot handles
Syntax
h = initialplot(sys, x0)h =initialplot(sys,x0,Tfinal)h =initialplot(sys,x0,t)h =initialplot(sys1,sys2,...,x0,t)h =initialplot(AX,...)h =initialplot(..., plotoptions)
Description
initialplot(sys,x0) plots the undriven response of the state-space model sys (created with ss) with initial condition x0 on the states. This response is characterized by these equations:
Continuous time: x = A x, y = C x, x(0) = x0
Discrete time: x[k+1] = A x[k], y[k] = C x[k], x[0] = x0
The time range and number of points are chosen automatically. initialplot also returns the plot handle h. You can use this handle to customize the plot with the getoptions and setoptions commands. Type
for a list of available plot options.
initialplot(sys,x0,Tfinal) simulates the time response from t=0 to the final time t=Tfinal. For discrete-time models with unspecified sample time, Tfinal should be the number of samples.
initialplot(sys,x0,t) specifies a time vector t to be used for simulation. For discrete systems, t should be of the form 0:Ts:Tf, where Ts is the sample time. For continuous-time models, t should be of the form 0:dt:Tf, where dt becomes the sample time of a discrete approximation of the continuous model.
initialplot(sys1,sys2,...,x0,t) plots the response 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
initialplot(AX,...) plots into the axes with handle AX.
initialplot(..., plotoptions) plots the initial condition response with the options specified in plotoptions. Type
Example
Plot a third-order system's response to initial conditions and use the plot handle to change the plot's title.
sys = rss(3); h = initialplot(sys,[1,1,1]) p = getoptions(h); % Get options for plot. p.Title.String = 'My Title'; % Change title in options. setoptions(h,p); % Apply options to the plot.
See Also
getoptions Get plot options
initial Plot response to initial conditions
setoptions Set plot options
| initial | interp | ![]() |
© 1994-2005 The MathWorks, Inc.