Simulink.Simulation.Variable class
Package: Simulink.Simulation
Description
The Simulink.Simulation.Variables
object specifies the variable and its
value used by the Simulink.SimulationInput
object during simulation. By
default, this object overrides variables that already exist in the base workspace or the data
dictionary.
In most cases, there is no need to create an object of this class directly. To add a
variable to the Simulink.SimulationInput
object use the
setVariable
method on the Simulink.SimulationInput
object.
Creation
var =
Simulink.Simulation.Variable(
creates a variableName
,Value
)Simulink.Simulation.Variables
object, var
,
that specifies the variable and its value.
var =
Simulink.Simulation.Variable(
creates a variableName
,Value
,'Workspace',WorkspaceName
)Simulink.Simulation.Variables
object, var
,
that specifies the variable defined in the specified workspace,
WorksapceName
and its value. Workspace can either be a model's name to
indicate that the variable is in a model workspace or 'global-workspace' to indicate that it
is either in the base workspace or in a data dictionary.
Properties
Version History
Introduced in R2020a