Pass Data to MATLAB from Python
When you pass Python® data as input arguments to MATLAB® functions, the MATLAB Engine API for Python converts the data into equivalent MATLAB data types.
Python Type to MATLAB Scalar Type Mapping
This table shows how MATLAB converts incoming Python scalar data to MATLAB data types.
Python Input Argument Type
— | Resulting MATLAB Data Type |
---|---|
|
|
| Complex |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Python objects (other than |
|
Python Container to MATLAB Array Type Mapping
This tables shows how MATLAB converts incoming Python container data to MATLAB data types.
Python Input Argument Type
— | Resulting MATLAB Data Type |
---|---|
| Numeric array |
|
|
|
|
| Cell array |
| Cell array |
| Cell array |
Unsupported Python Types
The MATLAB Engine API does not support these Python types:
Python class (
) objectsmodule
.type
None