Simulink.SimulationInput
Creates SimulationInput
objects to make changes to model for
multiple or individual simulations
Description
The Simulink.SimulationInput
object allows you
to make changes to a model and run simulations with those changes. These changes are
temporarily applied to the model. Using a Simulink.SimulationInput
object, you can change initial state, model
parameters, block parameters, external inputs, and variables. Through the Simulink.SimulationInput
object, you can also specify
MATLAB® functions to run at the start and the end of each simulation by using the
setPreSimFcn
function and the setPostSimFcn
.
Creation
simIn
= Simulink.SimulationInput
('ModelName')
creates a Simulink.SimulationInput
for the given model. You can then use
the functions below on the Simulink.SimulationInput
object
to modify the simulation parameters and simulate the model.
Properties
Object Functions
Method | Purpose |
---|---|
Set model parameters to be used for a specific simulation through
| |
Set block parameters to be used for a specific simulation through
SimulationInput object. | |
Set initial state to be used for a specific simulation through
SimulationInput object. | |
Set external inputs for a simulation through
SimulationInput object. | |
Set variables for a simulation through SimulationInput
object. | |
Specify a MATLAB function to run before start of each simulation through
SimulationInput object. | |
Specify a MATLAB function to run after each simulation is complete through
SimulationInput object. | |
Apply changes to the model specified through a
SimulationInput object. | |
Validate the contents of the SimulationInput
object. | |
Load variables from MAT file into a
Simulink.SimulationInput object. |
Examples
Version History
Introduced in R2017a