Simulink.data.assigninGlobal
Modify variable values in context of Simulink model
Description
Simulink.data.assigninGlobal(
assigns the value modelName
,varName
,varValue
)varValue
to the variable or data dictionary
entry varName
in the context of the Simulink® model modelName
. assigninGlobal
creates the variable or data dictionary entry if it does not already exist. The
function operates in the Design Data section of the data dictionary that is linked
to the target model or in the MATLAB® base workspace if the target model is not linked to any data
dictionary.
If the target model is linked to a data dictionary that references
other dictionaries, assigninGlobal
searches for varName
in
the entire dictionary hierarchy. If assigninGlobal
does
not find a matching entry, the function creates an entry in the dictionary
that is linked to the target model.
Examples
Input Arguments
Tips
assigninGlobal
helps you transition Simulink models to using data dictionaries. You can use the function to assign values to model variables before and after linking a model to a data dictionary.
Version History
Introduced in R2015a