Integrate Python Code with Simulink
Simulink allows you to implement algorithms designed using Python code. You can implement Python modules in Simulink using the MATLAB Function block, MATLAB System block, or Python Importer. For implementation of simple algorithms, use the MATLAB Function block. For algorithms that require handling of state dynamics, streaming data, and additional block customizations, use the MATLAB System block. Python Importer enables you to import Python modules into Simulink by generating custom blocks for specified functions.
For more information on using Python in MATLAB, see Call Python from MATLAB.
Topics
- Overview of Integrating Python Code with Simulink
Integrate Python code with Simulink Using MATLAB Function block or MATLAB System block.
- Import Python Code to Simulink Using Python Importer Wizard
Use the Python Importer to Import Python Modules and Packages to Simulink.