Data Type Mappings Between C++ and Strongly Typed MATLAB Code
C++ to MATLAB
This table shows the mapping of C++ data types to strongly typed MATLAB® data types.
| Description | C++ Data Type | MATLAB Data Type Representation |
|---|---|---|
| Real double scalar |
|
|
| Real double vector |
|
|
Complex double scalar |
|
|
Complex double vector |
|
|
| Real single scalar |
|
|
| Real single vector |
|
|
Complex single scalar |
|
|
Complex single vector |
|
|
| Real integer scalars |
|
|
| Real integer vectors |
|
|
| Complex integer scalars |
|
|
| Complex integer vectors |
|
|
| Logical scalar |
|
|
| Logical vector |
|
|
| Char scalar |
|
|
| Char vector |
|
|
| String |
|
|
| String vector |
|
|
Enum scalar | C++ scoped enumeration |
|
Enum vector |
|
|
MATLAB to C++
This table shows the mapping of strongly typed MATLAB data types to C++ data types.
| Description | MATLAB Data Type | C++ Data Type Representation |
|---|---|---|
| Real double scalar |
|
|
| Real double vector |
|
|
Complex double scalar |
|
|
Complex double vector |
|
If result
contains |
| Real single scalar |
|
|
| Real single vector |
|
|
| Complex single scalar |
|
|
| Complex single vector |
|
If result
contains |
| Real integer scalars |
|
|
| Real integer vectors |
|
|
| Complex integer scalars |
|
|
| Complex integer vectors |
|
If result
contains |
| Logical scalar |
|
|
| Logical vector |
|
|
| Char scalar |
|
|
| Char vector |
|
|
| String |
|
|
| String vector |
|
|
Enum scalar |
| scoped enumeration |
Enum vector |
|
|
| MATLAB cell scalar |
|
|
| MATLAB cell vector |
|
|
MATLAB struct |
|
|
MATLAB struct |
|
|
| MATLAB type that is not a supported C++ type |
|