getGlobalNamesImpl
MATLAB System 模块的全局变量名称
语法
name = getGlobalNamesImpl(obj)
说明
指定在 System object™ 中声明用于 Simulink® P 代码文件的全局变量的名称。对于 P 代码文件,除了在 name
= getGlobalNamesImpl(obj
)stepImpl
、outputImpl
或 updateImpl
中声明全局变量之外,还必须包含 getGlobalNamesImpl
方法。您可在 getGlobalNamesImpl
方法的元胞数组中声明全局变量。包含这些全局变量的 System object 使用 MATLAB System (Simulink) 模块包含在 Simulink 中。要在 Simulink 中启用全局变量,您的模型还必须包含具有与全局变量名匹配的数据存储名称的 Data Store Memory (Simulink) 模块。
运行时详细信息
getGlobalNamesImpl
由 MATLAB System 模块调用。
方法编写提示
您必须先对此方法设置 Access = protected
。
输入参数
输出参数
示例
版本历史记录
在 R2016b 中推出
另请参阅
stepImpl
| updateImpl
(Simulink) | outputImpl
主题
- System Object Global Variables in Simulink (Simulink)