Main Content

MATLAB Engine API for Java

The MATLAB® Engine API for Java® enables Java programs to interact with MATLAB synchronously or asynchronously, including:

  • Start and terminate MATLAB.

  • Connect to and disconnect from MATLAB sessions on the local machine.

  • Call MATLAB functions with input arguments passed from Java and output variables returned from MATLAB.

  • Evaluate MATLAB statements in the MATLAB base workspace.

  • Pass variables from Java to MATLAB and MATLAB to Java.

Asynchronous communication with MATLAB is based on the Java Future interface, java.util.concurrent.Future.

The size of data arrays passed between Java and MATLAB is limited to 2 GB. This limit applies to the data plus supporting information passed between the processes.

The MATLAB Engine API for Java is included as part of the MATLAB product. You must have a supported version of JDK™ installed to build a MATLAB Engine application for Java. For version information, see MATLAB Interfaces to Other Languages.

Related Topics