Main Content

Conversion of Java Types to MATLAB Types

Value Passed to Java Method is:Input type Received by MATLAB is:Dimension of Data in MATLAB is:

java.lang.Byte, byte

int8{1,1}

byte[] data

{1, data.length}

java.lang.Shortshort

int16{1,1}

short[] data

{1, data.length}

java.lang.Integer, int

int32{1,1}

int[] data

{1, data.length}

java.lang.Long, long

int64{1,1}

long[] data

{1, data.length}

java.lang.Float,float

single{1,1}

float[] data

{1, data.length}

java.lang.Double, double

double{1,1}

double[] data

{1, data.length}

java.lang.Boolean, boolean

logical{1,1}

boolean[] data

{1, data.length}

java.lang.Character, char

char{1,1}

char[] data

{1, data.length}

java.lang.String data

{1, data.length()}

java.lang.String[] data

cell{1, data.length}

java.lang.Object[] data

{1, data.length}

T[] data

MATLAB type for T { data.length, dimensions(T[0]) }, if T is an array
{ 1, data.length}, if T is not an array