Python with MATLAB for Wireless
R2026bCollaborate with colleagues who work in other deep learning frameworks to train and test PyTorch®, TensorFlow™, or ONNX™ models. You can also import and export functions.
You can run simulations by calling Python from MATLAB or by calling MATLAB from Python.
Workflow steps include data generation, data preparation, deep neural model training, model compression, model testing, and model deployment.
These examples focus on the training, testing, and deployment workflow steps to demonstrate running PyTorch models for channel state information (CSI) feedback compression and CSI prediction techniques using artificial intelligence (AI) in 5G wireless communication systems.
Topics
Introduction
- Call Python from MATLAB for Wireless
AI for wireless workflows calling Python from MATLAB to run PyTorch or TensorFlow models. (Since R2026a) - Call MATLAB from Python for Wireless
AI for wireless workflows with Python running PyTorch or TensorFlow models and calling MATLAB. (Since R2026b) - PyTorch Wrapper Template
You can use your own PyTorch models in MATLAB by using the Python interface.
Model Training
- Train PyTorch Channel Prediction Models (5G Toolbox)
Train a PyTorch neural network for channel prediction by using data generated in MATLAB. (Since R2025a) - Train PyTorch Channel Prediction Models with Online Training (5G Toolbox)
Enable real‐time adaptation to time‐varying wireless channels by generating each training batch in MATLAB on-the-fly to train a PyTorch GRU channel prediction network online. (Since R2026a) - Offline Training and Testing of PyTorch Model for CSI Feedback Compression (5G Toolbox)
Train an autoencoder-based PyTorch neural network offline and test for CSI compression. (Since R2025a) - Online Training and Testing of PyTorch Model for CSI Feedback Compression (5G Toolbox)
Train an autoencoder-based PyTorch neural network online and test for CSI compression. (Since R2025a) - Offline CSI Feedback Training in Python with MATLAB Data Generation (5G Toolbox)
Train a PyTorch-based autoencoder for CSI feedback compression using realistic CSI data generated in MATLAB. (Since R2026b) - Online CSI Feedback Training in Python with MATLAB Data Generation (5G Toolbox)
Train a PyTorch-based autoencoder for CSI feedback compression using fresh CSI data generated on demand in MATLAB. (Since R2026b)
Model Testing
- Test AI-based CSI Compression Techniques for Enhanced PDSCH Throughput (5G Toolbox)
Measure physical downlink shared channel (PDSCH) throughput in a 5G New Radio (NR) system, with a primary focus on AI-based compression methods for CSI feedback. (Since R2026a) - Apply Transfer Learning on PyTorch Model to Identify 5G and LTE Signals (5G Toolbox)
Coexecution with Python to identify 5G NR and LTE signals by using the transfer learning technique on a pre-trained PyTorch semantic segmentation network for spectrum sensing. (Since R2025a) - Verify Performance of 6G AI-Native Receiver Using MATLAB and PyTorch Coexecution (5G Toolbox)
Integrate a trained PyTorch network with MATLAB-based data generation to simulate an AI-native air interface. (Since R2025a)
Model Deployment
- Import TensorFlow Channel Feedback Compression Network and Deploy to GPU (5G Toolbox)
Generate GPU specific C++ code for a pretrained TensorFlow channel state feedback autoencoder. (Since R2023b)