getValue
返回数据字典条目的值
说明
返回数据字典条目 entryValue = getValue(entryObj)entryObj(一个 Simulink.data.dictionary.Entry 对象)的值。
要以编程方式访问变量以扫描模块参数值,请考虑使用 Simulink.SimulationInput 对象,而不是通过数据字典的编程接口修改变量。请参阅优化、估计和扫描模块参数值。
示例
输入参数
替代方法
通过使用 Simulink.data.DataConnection 对象函数返回数据字典条目的值。
dd = Simulink.data.connect("myDictionary_ex_API.sldd"); set(dd,"b",2); get(dd,"b")
ans =
2您也可以使用圆点表示法获取该值。
dd = Simulink.data.connect("myDictionary.sldd")
dd.b = 2;
dd.bans =
2版本历史记录
在 R2015a 中推出