MATLAB Function 模块中的变量
为 MATLAB Function 模块定义模块变量
在函数代码中定义 MATLAB Function 模块中的变量。调整函数变量属性以访问 Simulink® 模型内部和外部的数据源。
工具
| MATLAB Function 模块编辑器 | Create, edit, and debug MATLAB code in MATLAB Function blocks |
模块
| MATLAB Function | 在 Simulink 模型中包含 MATLAB 代码 |
对象
MATLABFunctionConfiguration | MATLAB Function block property configuration |
Stateflow.EMChart | Stateflow interface to MATLAB Function block |
主题
- Create MATLAB Function Block Variables
Use MATLAB Function block variables to modify data input to the block, or to output modified data to the model.
- Set Properties for MATLAB Function Block Variables
Use the Property Inspector or the Model Explorer to define properties of MATLAB Function block variable properties.
- 通过使用参数变量访问 MATLAB Function 模块中的工作区数据
将 Simulink 参数和 MATLAB® 变量传递给 MATLAB Function 模块。
- 访问 MATLAB Function 模块中的数据存储数据
通过使用全局变量访问 MATLAB Function 模块中的数据存储数据。