setValue
Set value of data dictionary entry
Description
setValue(
assigns the value entryObj,newValue)newValue to the data dictionary entry
entryObj, a Simulink.data.dictionary.Entry object.
To programmatically access variables for the purpose of sweeping block parameter values,
consider using Simulink.SimulationInput objects instead of
modifying the variables through the programmatic interface of the data dictionary. See Optimize, Estimate, and Sweep Block Parameter Values.
Examples
Input Arguments
Alternatives
Set the value of a data dictionary entry by using a
Simulink.data.DataConnectionobject function.dd = Simulink.data.connect("myDictionary.sldd") set(dd,"b",2); get(dd,"b")
ans = 2You can also set the value by using dot notation.
dd = Simulink.data.connect("myDictionary.sldd") dd.b = 2; dd.bans = 2You can use the Model Explorer window to view and change the values of data dictionary entries.
You can use the Model Explorer window to view and change the values of data dictionary entries.
Version History
Introduced in R2015a