The MATLAB® Production Server™ Java client API allows you to evaluate MATLAB functions on remote servers using native Java data. You can choose to two styles of API to evaluate a MATLAB function:
static proxy — you provide an interface that models the MATLAB function signature. This enforces passing the proper data types to the function at compile time.
dynamic proxy — you pass the function name as a parameter to the proxy along with the function arguments. This defers type checking until runtime.
For an overview of how to create client programs, see Create a Java MATLAB Production Server Client.
For a complete example of a client implementation, see Create a Java Client.
To create a MATLAB Production Server client in Java:
You configure the client-server connection using an object that
Invoke MATLAB functions using a function name and argument list.
Connecting to a MATLAB Production Server instance over HTTPS provides a secure channel for executing MATLAB functions.
MWSSLConfig object provides information to configure HTTPS.
This example shows an application that calculates a bond price from a simple formula.
MATLAB allows users to write functions that return multiple outputs.
MATLAB supports functions with both variable number of
input arguments (
varargin) and variable number
of output arguments (
Structures (or structs) are MATLAB arrays with elements accessed by textual field designators.
MATLAB data types that are not supported for client and server marshaling
When you write Java interfaces to invoke MATLAB code, remember these considerations:
There are many data types that you can work with in MATLAB.
Rules for data conversion from Java to MATLAB types