getVariablePart
Get value of variable property in model workspace
Description
returns the value of the variable property named varValue
= getVariablePart(mdlWks
,varName.Property
)varName.Property
that
exists in the model workspace represented by the Simulink.ModelWorkspace
object mdlWks
.
If the value of the variable property is a handle to a handle object (such as
Simulink.Parameter
), getVariablePart
returns a copy of
the handle.
Using getVariablePart
is preferable to using evalin
for
getting variable properties in the model workspace because:
The function does not dirty the model.
Use of the function does not result in the creation of a new variable or other unintended results.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2018b