通过合并用 C 或 C++ 编写的自定义代码，增强您的 Stateflow® 图的功能，并利用您的原有代码。
Integrate preexisting custom code into Simulink® models.
Use custom code for simulation and code generation in library models.
从 Stateflow 图中调用自定义代码函数。
Use custom code to design a system for battery management.
Integrate custom C++ code with Stateflow® charts in Simulink® models. By sharing data and functions between your custom code and your Stateflow charts, you can augment the capabilities of Stateflow and take advantage of your preexisting code. For more information, see Reuse Custom Code in Stateflow Charts.
Use structures from custom code in a Stateflow® chart. You can define structure typed data in C code and integrate it with Stateflow structures and Simulink® buses. By sharing data with custom code, you can augment the capabilities supported by Stateflow and take advantage of your preexisting code. For more information, see Reuse Custom Code in Stateflow Charts.
Pass string data between Stateflow charts and custom C code.
您点击的链接对应于以下 MATLAB 命令：
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office