This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Initial condition response of state-space model


[y,t,x] = initial(sys,x0)
[y,t,x] = initial(sys,x0,Tfinal)
[y,t,x] = initial(sys,x0,t)


initial(sys,x0) calculates the unforced response of a state-space (ss) model sys with an initial condition on the states specified by the vector x0:


This function is applicable to either continuous- or discrete-time models. When invoked without output arguments, initial plots the initial condition response on the screen.

initial(sys,x0,Tfinal) simulates the response from t = 0 to the final time t = Tfinal. Express Tfinal in the system time units, specified in the TimeUnit property of sys. For discrete-time systems with unspecified sample time (Ts = -1), initial interprets Tfinal as the number of sampling periods to simulate.

initial(sys,x0,t) uses the user-supplied time vector t for simulation. Express t in the system time units, specified in the TimeUnit property of sys. For discrete-time models, 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 to the continuous system (see impulse).

To plot the initial condition responses of several LTI models on a single figure, use




(see impulse for details).

When invoked with output arguments,

[y,t,x] = initial(sys,x0)

[y,t,x] = initial(sys,x0,Tfinal)

[y,t,x] = initial(sys,x0,t)

return the output response y, the time vector t used for simulation, and the state trajectories x. No plot is drawn on the screen. The array y has as many rows as time samples (length of t) and as many columns as outputs. Similarly, x has length(t) rows and as many columns as states.


collapse all

Plot the response of the following state-space model:


Take the following initial condition:


a = [-0.5572, -0.7814; 0.7814, 0];
c = [1.9691  6.4493];
x0 = [1 ; 0];

sys = ss(a,[],c,[]);


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.

Introduced before R2006a