External Interfaces/API    

Handling Data Returned from a Java Method

In many cases, data returned from Java is incompatible with the data types operated on within MATLAB. When this is the case, MATLAB converts the returned value to a data type native to the MATLAB language. This section describes the conversion performed on the various data types that can be returned from a call to a Java method.

This section addresses the following topics:

Conversion of Java Return Data

The following table lists Java return types and the resulting MATLAB types. For some Java base return types, MATLAB treats scalar and array returns differently, as described following the table.

Table 5-3: Conversion of Java Types to MATLAB Types  
Java Return Type
If Scalar Return, Resulting MATLAB Type
If Array Return, Resulting MATLAB Type
boolean
double (logical)
double (logical)
byte
double
int8
short
double
int16
int
double
int32
long
double
double
float
double
single
double
double
double
char
char
char


  Passing Data to Overloaded Methods Built-In Data Types