Main Content

MATLAB Function 模块基础

将 MATLAB® 函数集成到 Simulink® 模型中

使用 MATLAB Function 模块在 Simulink 模型中实现 MATLAB 函数。

工具

MATLAB Function 模块编辑器Create, edit, and debug MATLAB code in MATLAB Function blocks

模块

MATLAB FunctionSimulink 模型中包含 MATLAB 代码

对象

MATLABFunctionConfigurationMATLAB Function block property configuration (自 R2019b 起)
Stateflow.EMChartStateflow interface to MATLAB Function block

主题

疑难解答

调试 MATLAB Function 模块

在仿真期间调试 MATLAB Function 模块代码。

Prevent Algebraic Loop Errors in MATLAB Function, Chart, and Truth Table Blocks

Adhere to restrictions for using MATLAB Function blocks, Chart, and Truth Table blocks in feedback loops.

Initialize Persistent Variables in MATLAB Functions

Specialized semantics impact the way that a function initializes persistent data.