Simulink.Simulation.Variable Class
Namespace: Simulink.Simulation
Variables in Simulink.SimulationInput objects
Description
The Simulink.Simulation.Variable 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, you do not 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,
WorkspaceName and its value. The workspace can either be the name of a
model to indicate that the variable is in a model workspace or
'global-workspace' to indicate that the variable is either in the base
workspace or in a data dictionary.
Properties
Version History
Introduced in R2020a