Main Content
setVariablePart
Set property of variable in model workspace
Description
assigns varValue
= setVariablePart(mdlWks
,varName.Property
, varValue
)varValue
to the MATLAB variable property
varName.Property
in the model workspace represented by the
Simulink.ModelWorkspace
object mdlWks
.
Using setVariablePart
is preferable to using evalin
for
assigning variable properties in the model workspace because the
setVariablePart
function does not create a new variable or cause
unintended results.
Examples
Input Arguments
Version History
Introduced in R2018b