Main Content

Java Engine API Summary

com.mathworks Packages

Classes in com.mathworks PackagePurpose
com.mathworks.engine.MatlabEngine

Definition of the API for the Java® engine

com.mathworks.engine.EngineException

Failure by MATLAB® to start, connect, terminate, or disconnect

com.mathworks.engine.UnsupportedTypeException

Unsupported data type in input or output of MATLAB function

com.mathworks.engine.MatlabExecutionException

Runtime error in MATLAB code

com.mathworks.engine.MatlabSyntaxException

Syntax error in MATLAB expression

The com.mathworks.matlab.types package provides support for specialized MATLAB types in Java.

Classes in com.mathworks.matlab.types PackageMATLAB Type
com.mathworks.matlab.types.Complex

MATLAB complex values in Java

com.mathworks.matlab.types.HandleObject

MATLAB handle objects in Java

com.mathworks.matlab.types.ValueObjectg2282090

MATLAB value objects in Java

com.mathworks.matlab.types.Struct

MATLAB struct (structures) in Java

com.mathworks.matlab.types.CellStr

Create a cell array of characters to pass to MATLAB

com.mathworks.engine.MatlabEngine Methods

Static methodsPurpose

startMatlab

Start MATLAB synchronously

startMatlabAsync

Start MATLAB asynchronously

findMatlab

Find all available shared MATLAB sessions running on the local machine synchronously

findMatlabAsync

Find all available shared MATLAB sessions from local machine asynchronously

connectMatlab

Connect to a shared MATLAB session on local machine synchronously

connectMatlabAsync

Connect to a shared MATLAB session on local machine asynchronously

Member MethodsPurpose

feval

Evaluate a MATLAB function with arguments synchronously

fevalAsync

Evaluate a MATLAB function with arguments asynchronously

eval

Evaluate a MATLAB statement as a string synchronously

evalAsync

Evaluate a MATLAB statement as a string asynchronously

getVariable

Get a variable from the MATLAB base workspace synchronously

getVariableAsync

Get a variable from the MATLAB base workspace asynchronously

putVariable

Put a variable in the MATLAB base workspace synchronously

putVariableAsync

Put a variable in the MATLAB base workspace asynchronously

disconnect

Explicitly disconnect from the current MATLAB session synchronously

disconnectAsync

Explicitly disconnect from the current MATLAB session asynchronously

quit

Force the shutdown of the current MATLAB session synchronously

quitAsync

Force the shutdown of the current MATLAB session asynchronously

close

Disconnect or terminate current MATLAB session

java.util.concurrent.Future Interface

Member MethodsPurpose

get

Wait for the computation to complete and then return the result

cancel

Attempt to cancel execution of this task

isCancelled

Return true if this task was cancelled before it completed

isDone

Return true if this task completes

For more information, see the Java documentation for java.util.concurrent.Future.