The MathWorks introduced the py module for MATLAB in 2014. This module provides a direct binary interface between MATLAB and Python, opening vast new possibilities for both languages. In addition to making it possible to call any Python function, MATLAB’s py module allows one to create native Python objects within MATLAB. Such variables retain their full complement of Python methods—for example, a native Python string created in MATLAB can call all its 40 methods, from .capitalize() to .zfill().
6. Call Python Functions from MATLAB
Get Python for MATLAB Development: Extend MATLAB with 300,000+ Modules from the Python Package Index now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.