将 Python 代码与 Simulink 集成
在 Simulink® 中用 Python 代码实现算法
Simulink 允许您实现使用 Python 代码设计的算法。您可以使用 MATLAB Function 模块或 MATLAB System 模块在 Simulink 中实现 Python 模块。对于简单算法的实现,请使用 MATLAB Function 模块。对于需要处理状态动态、流化数据和其他模块自定义的算法,请使用 MATLAB System 模块。有关在 MATLAB 中使用 Python 的详细信息,请参阅从 MATLAB 中调用 Python。
主题
- Overview of Integrating Python Code with Simulink
Integrate Python code with Simulink Using MATLAB Function block or MATLAB System block.