Simulink.data.getVariableFromGlobal
Description
Simulink.data.getVariableFromGlobal(
retrieves the value of the variable modelName
,variableName
)variableName
within the
context of the Simulink® model or a Subsystem Reference block specified by
modelName
. The search includes the base workspace and
the external data sources linked to the model, such as Simulink data dictionary or MAT files.
If the variable is found, the function returns its value. If the variable does not exist within the context of Simulink model or a Subsystem Reference, the function reports an error.
Examples
Input Arguments
Limitations
If there are duplicate variables that has consistent definitions in the data dictionary and MAT files, the function reports an error.
Version History
Introduced in R2024b