Call MATLAB from Python for Wireless
R2026bBefore you can call MATLAB® from Python® to run wireless simulations, you must first configure your computer to use Python and configure the MATLAB Engine API for Python. To install a supported python implementation on your computer, see Install and Configure Python for Use in MATLAB. To configure the MATLAB engine API for Python, see Get Started with MATLAB Engine API for Python.
Once you have configured your computer and your MATLAB environment, you can then:
Use MATLAB to generate data sets to train the PyTorch® models by leveraging the Wireless Communications toolboxes.
Run simulations with your PyTorch model instantiations calling MATLAB to perform tasks in the simulation workflow.
Test the PyTorch models in link-level and system-level simulations.
Leverage software-defined radio (SDR) support to test your design with over-the-air (OTA) signals.
Import and deploy your system onto several possible platforms after qualifying your design. For more information, see Interoperability Between Deep Learning Toolbox, TensorFlow, PyTorch, and ONNX (Deep Learning Toolbox).
Try some sample AI applications in Wireless Workflows with Python calling MATLAB.
Wireless Workflows with Python calling MATLAB
These examples show AI for wireless applications with Python running PyTorch models and calling MATLAB.
Each example includes a requirements supporting file to identify the Python libraries that you need and their specific versions. You can use the
requirements files with the pip command line program to install
all the required libraries. For more information, see https://pip.pypa.io/en/stable/user_guide/.