Main Content

Integrate Python Code into Simulink

Integrate algorithms with Python® code into 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