Using MATLAB with Python

Files demonstrating MATLAB and Python interoperability
Updated 30 Aug 2022

These are the supporting files for the "How to Call Python from MATLAB" ( and "How to Call MATLAB from Python" ( videos.

They show examples of speech-to-text recognition and sentiment analysis of the detected text by combining MATLAB and Python functionality.

This example requires MATLAB R2019b or later, as well as Statistics and Machine Toolbox and Text Analytics Toolbox.

You will also need to install Python and the appropriate packages to run this example. The two main ones you will need are as follows; however, you may need to first resolve other unmet dependencies.

pip install speechrecognition pocketsphinx

This example was tested using Python versions 3.6 and 3.7.

Cite As

Sebastian Castro (2024). Using MATLAB with Python (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with R2019b and later releases
Platform Compatibility
Windows macOS Linux
Find more on Call Python from MATLAB in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes

Linked to new GitHub repository.


Added YouTube video links


Corrected submission title.


Connected to GitHub


To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.