Get Started with MATLAB Engine API for Python
MATLAB® Engine API for Python® provides a Python package named matlab
that enables you to call
MATLAB functions from Python. You install the package once, and then you can call the engine in your
current or future Python sessions. For help on installing or starting the engine, refer to:
The matlab
package contains the following:
MATLAB Engine API for Python
A set of MATLAB array classes in Python (see MATLAB Arrays as Python Variables)
The engine provides functions to call MATLAB, and the array classes provide functions to create MATLAB arrays as Python objects. You can create an engine and call MATLAB functions with matlab.engine
. You can create
MATLAB arrays in Python by calling constructors of an array type (for example,
matlab.double
to create an array of doubles). MATLAB arrays can be input arguments to MATLAB functions called with the engine.
The table shows the structure of the matlab
package.
Package | Function or Class | Description | |
---|---|---|---|
|
| Python function to create a | |
|
| Python class to provide methods for calling MATLAB functions | |
|
| Python class to hold results from a MATLAB function called asynchronously | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold array of MATLAB type | |
|
| Python class to hold a handle to a MATLAB object |