Data Type Mappings Between .NET 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
|
|
|
Complex double
MATLAB does not support complex numbers for other numeric types. |
|
|
Real single
|
|
|
Real integer
|
|
|
Logical
|
|
|
Char
|
|
|
String
|
|
|
Enum
|
|
|
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
|
|
|
Complex double
Stored as a complex number, even if result is real |
|
|
Real single
|
|
|
Real integer
|
|
|
Logical
|
|
|
Char
|
|
|
String
|
|
|
Enum
|
|
|
MATLAB cell
|
|
|
For MATLAB types that do not have a corresponding C# type, such as
struct
or dictionary
, the generated type is
dynamic
.