Python with MATLAB
AI for wireless directly call Python® library functionality from MATLAB®
Collaborate with colleagues who work in other deep learning frameworks to train and test PyTorch®, TensorFlow™, or ONNX™ models by calling Python directly from MATLAB. You can also import and export functions.
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 R2025a) - 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)
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)