Using MATLAB and Python Resources
Learn how to combine MATLAB and Python for your projects and AI applications. For Python users, get tips, explore MATLAB language highlights, compare data types, and more.
Learn how to combine MATLAB and Python for your projects and AI applications. For Python users, get tips, explore MATLAB language highlights, compare data types, and more.
You don’t have to choose between programming languages. Take advantage of both languages by using them together.
MATLAB provides built-in support for Python®, allowing MATLAB code to interact with Python scripts and functions directly, and vice versa.
Once you have confirmed your system configuration, there are several ways to interact with Python. For example, you can call Python functions from the MATLAB command line.
x = py.math.sqrt(42)
Engineers use MATLAB with Python for:
You can use built-in Python libraries and user-created functions and scripts directly from the MATLAB environment and pass data between MATLAB and Python.
The MATLAB Engine API for Python enables you to use interactive apps and advanced scientific and engineering functionality in MATLAB and Simulink from within Python.
You can import PyTorch®, TensorFlow, and ONNX models into MATLAB, and export networks to TensorFlow and ONNX. Also, you can use imported networks with MATLAB built-in tools for explainable AI and verification, simulation with Simulink, automatic code generation, and more.
You can package and share MATLAB programs to integrate with Python applications or deploy them to various cloud and hardware platforms.
Get the most out of MATLAB as a Python user.
You can access MATLAB from Jupyter or Visual Studio Code by using your IDE of choice to interact with MATLAB apps and functionality.
You can learn how to use MATLAB most effectively with cheat sheets, interactive courses, and documentation.
MATLAB can help you with your advanced mathematics and domain-specific engineering needs. You can get started with these topics using many detailed examples and short interactive courses on image and signal processing, physical and system modeling, control design and more.