集成外部代码
集成 MATLAB 函数、Simulink 模型和 C 函数,实现 Stateflow 与外部代码之间的通信
在图中重用现有算法和外部编程语言。直接从状态和转移调用 MATLAB、C 或 C++ 函数。从图生成代码,以便部署到嵌入式系统和外部应用程序上。
主题
- 在 Stateflow 图中集成 MATLAB 函数
定义 MATLAB® 函数的逻辑行为。
- Use Custom C or C++ Code in Stateflow Charts
Integrate preexisting custom code into Simulink® models.
- Call Extrinsic MATLAB Functions in Stateflow Charts
Access MATLAB functions that are not supported for code generation.
- 调用 C 库函数
在状态和转移标签中访问 C 函数。
- Control Function-Call Subsystems
Bind a function-call output event to the activity of a state.
- 使用事件同步模型组件
使用事件与 Simulink 和 MATLAB 通信。