The following table lists the data conversion rules for converting Java® data types to MATLAB® types.
Note: The conversion rules apply to scalars, vectors, matrices, and multidimensional arrays of the types listed. The conversion rules apply not only when calling your own methods,
but also when calling constructors and factory methods belonging to
the When calling an |
Java to MATLAB Conversion Rules
Java Type | MATLAB Type | |
---|---|---|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
The following table lists the data conversion rules for converting MATLAB data types to Java types.
Note: The conversion rules apply to scalars, vectors, matrices, and multidimensional arrays of the types listed. |
MATLAB to Java Conversion Rules
MATLAB Type | Java Type (Primitive) | Java Type (Object) | |
---|---|---|---|
cell | Not applicable | Object
| |
structure | Not applicable | Object
| |
char | char | java.lang.Character | |
double | double | java.lang.Double | |
single | float | java.lang.Float | |
int8 | byte | java.lang.Byte | |
int16 | short |
| |
int32 | int | java.lang.Integer | |
int64 | long | java.lang.Long | |
uint8 | byte | java.lang.Byte Java has no unsigned
type to represent the | |
uint16 |
| java.lang.short Java has no unsigned
type to represent the | |
uint32 | int | java.lang.Integer Java has no
unsigned type to represent the | |
uint64 | long | java.lang.Long Java has no unsigned
type to represent the | |
logical | boolean | java.lang.Boolean | |
Function handle | Not supported | ||
Java class | Not supported | ||
User class | Not supported |