Data Conversion Rules
Java to MATLAB Conversion Rules (Continued)
Java Type MATL AB Type
java.lang.Float single
java.lang.Byte int8
java.lang.Integer int32
java.lang.Long int64
java.lang.Short int16
java.lang.Number double
Note Subclasses of java.lang.Number not listed above are
converted to
double.
java.lang.Boolean logical
java.lang.Character char
java.lang.String char
Note A Java string is converted to a 1-by-N array of char
with N equal to the length of the input string.
An array of Java strings (
String[]) is converted to an M-by-N
array of char,withM equal to the number of elements in the
input array and
N equal to the maximum length of any of
the strings in the array.
Higher dimensional arrays of
String are converted similarly.
In general, an
N-dimensional array of String is converted
to an
N+1 dimensional array of char with appropriate ze ro
padding w here supplied strings have different lengths.
6-11
Komentarze do niniejszej Instrukcji