Java Client Programming - MATLAB & Simulink (original) (raw)
Main Content
Create client programs in Java®
Topics
Programming Using Static and Dynamic Proxy
- Create MATLAB Production Server Java Client Using MWHttpClient Class
Define an interface, instantiate a static proxy object, and then call the deployed function. - Configure Client-Server Connection
Extend theMWHttpClientDefaultConfig
class and override its methods to modify the default configuration. - Invoke MATLAB Functions Dynamically
Invoke MATLAB functions using a function name and argument list. - Bond Pricing Tool for Java Client
This example shows an application that calculates a bond price from a simple formula. - Java Client Coding Best Practices
When you write Java interfaces to invoke MATLAB code, remember these considerations:
Inputs and Outputs
- Code Multiple Outputs for Java Client
MATLAB allows users to write functions that return multiple outputs. - Code Variable-Length Inputs and Outputs for Java Client
MATLAB supports functions with both variable number of input arguments (varargin
) and variable number of output arguments (varargout
).
Security
- Execute MATLAB Functions Using HTTPS
Configure the server and client environment to use SSL, then create a program proxy using the URL of the deployed application. - Customize Security Configuration
Configure HTTPS settings usingMWSSLConfig
.
Data Types and Data Conversion
- Marshal MATLAB Structures (Structs) in Java
Structures (or structs) are MATLAB arrays with elements accessed by textual field designators. - Evaluate Deployed Machine Learning Models Using Java Client
This example shows how to write a client application that sends an array of objects to a deployed machine learning model. - Data Conversion with Java and MATLAB Types
There are many data types that you can work with in MATLAB. - Conversion of Java Types to MATLAB Types
Learn how the server converts data between Java and MATLAB data types. - Supported MATLAB Data Types for Client and Server Marshaling
MATLAB Production Server supports marshaling of several MATLAB data types between client applications and server instances.