setInitialState
Specify initial state for simulation using
SimulationInput
or Simulation
object
Description
specifies the initial state s
= setInitialState(s
,xinit
)xinit
on the Simulink.SimulationInput
or Simulation
object s
. Specifying the initial state
on a SimulationInput
or Simulation
object is the
equivalent of configuring the Initial state parameter in
simulations you run using the object. The model is modified during initialization to
use the initial state you specify, and the modifications revert when the simulation
completes.
When you specify the initial state for simulation using the
setInitialState
function, you do not need to specify model
configuration parameters using the setModelParameter
function
or specify the value of the variable that contains the initial state using the
setVariable
function.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017aSee Also
Objects
Simulink.SimulationInput
|Simulation
|Simulink.op.ModelOperatingPoint
|Simulink.SimulationData.Dataset