Pass .NET Data Types to MATLAB Functions
When you pass .NET data as input arguments to MATLAB® functions, the engine converts the data into equivalent MATLAB data types.
These tables show how the engine maps .NET data types to MATLAB data types.
Pass .NET Numeric Types to MATLAB
.NET Data Type (Scalar) | Resulting MATLAB Type (Scalar) |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| complex |
|
|
.NET Data Type (1-D Vector) | Resulting MATLAB Type (1-D Vector) |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| complex |
|
|
.NET Data Type (N-D Array) | Resulting MATLAB Type (N-D Array) |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| complex |
|
|
Constants | Resulting MATLAB Value |
---|---|
System.Double.NaN | Result of |
System.Single.NaN | Result of |
System.Double.PositiveInfinity | Result of |
System.Single.PositiveInfinity | Result of |
System.Double.NegativeInfinity | Result of |
System.Single.NegativeInfinity | Result of |
Note
The .NET System.Decimal
type is not supported for scalar, vector,
or array arguments.
Pass .NET String and Character Types to MATLAB
.NET Data Type (Scalar) | Resulting MATLAB Type (Scalar) |
---|---|
|
|
|
|
null |
|
.NET Data Type (1-D Vector) | Resulting MATLAB Type (1-D Vector) |
---|---|
|
|
|
|
.NET Data Type (N-D Array) | Resulting MATLAB Type (N-D Array) |
---|---|
|
|
|
|
Pass .NET System.Object
to MATLAB
.NET Data Type | Resulting MATLAB Type |
---|---|
| 1-D cell vector |
| N-D cell array |
Pass .NET Handle and Value Objects to MATLAB
.NET Object Type | Resulting MATLAB Type |
---|---|
| scalar of underlying MATLAB type |
| 1-D vector of underlying MATLAB type |
| N-D array of underlying MATLAB type |