File Exchange

image thumbnail

Core_py2matlab: convert data from Python to MATLAB and back.

version (9.71 KB) by Kyle
Convert Python data structures to MATLAB data structures and vice versa.


Updated 04 Nov 2015

View Version History

View License

With a Python distribution and MATLAB installed on the same machine, MATLAB can create Python data structures from within; e.g. myPyStr = py.str('Hello World!'). Python data structures can also be created within MATLAB by the output of a Python package. Python data can be converted back into a MATLAB data type through type-conversion, e.g. char(myPyStr). This function automates the identification of the Python data type and convert it to the appropriate MATLAB data type and vice versa.

Cite As

Kyle (2021). Core_py2matlab: convert data from Python to MATLAB and back. (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Adam Connolly

excellent - thank you

Yann Debray

Pierre Harouimi

Omar Joya

Very useful. Thanks!

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!