Matlab Database > Miscellaneous > How to Access Matlab from Java

Matlab File(s)

Title: How to Access Matlab from Java
Author: Andreas Klimke
E-Mail: andreasklimke-AT-gmx.de
Institution: Technische Universität München
Description: Combining the strengths of the Java (TM) programming language and The Mathworks' Matlab (TM) offers interesting new possibilities for application development. Java and its J2EE (TM) development environment are well established today as to provide solutions for dynamic Web services, large-scale distributed systems, and other network-centric applications. Matlab is a technical computing environment with a high-level programming language. Due to its ease of use and its strong graphics capabilities, it has become popular across many engineering disciplines.

Matlab includes an interface to Java. It allows Matlab to access Java (you may call Java classes from Matlab), but not vice versa. This introductory article presents two alternative solutions on how to interface Matlab with Java, one based on the Java Runtime class, the other one based on the Java Native Interface and Matlab's C Engine library. With the proposed strategies, a Java-based system can easily start a new Matlab session and communicate with it, thus employ Matlab as the computational engine. Advantages and disadvantages of each approach are presented.

The complete preprint describing both approaches is available for download at http://preprints.ians.uni-stuttgart.de.

Important note: Approach 1, using the Java Runtime class and input/output streams does not work on Windows.

Keywords: Matlab, Java, JNI, interface
File Name: engine.zip
File Size: 16 KB
File Version: 1.01
Matlab Version: 6.5 (R13)
Date: 2003-07-17
Downloads: 7787
Download File

Upload your own files today! Click here for more information.