Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Calling Matlab functions from JAVA GU

Subject: Calling Matlab functions from JAVA GU

From: PMN

Date: 29 Nov, 2010 08:45:51

Message: 1 of 3

Dear All,
Please let me know how to call MATLAB functions from a Java Gui.
I had tried a lot in net but didn't get a clear picture,

Subject: Calling Matlab functions from JAVA GU

From: Torsten

Date: 29 Nov, 2010 15:22:07

Message: 2 of 3

Depends on your environment. On a windows system you could use a java - com bridge to call the matlab com automation server (ActiveX).
The easiest solution however would be to buy the Matlab Compiler and Java Builder with which you can build a java component from your Matlab code.
-Torsten

Subject: Calling Matlab functions from JAVA GU

From: Yair Altman

Date: 29 Nov, 2010 20:33:36

Message: 3 of 3

pmn <praveenmn1@gmail.com> wrote in message <9579112e-904c-4b0a-b8d1-889aa1595e9d@37g2000prx.googlegroups.com>...
> Dear All,
> Please let me know how to call MATLAB functions from a Java Gui.
> I had tried a lot in net but didn't get a clear picture,

There are several different ways you could do this:

1. Use JNI to directly call the Matlab DLLs. For example: http://jmatlink.sourceforge.net , http://www.jstatcom.com/jmatlab.html or https://jna.dev.java.net

2. Use RMI/JMI to directly access the Java engine: http://UndocumentedMatlab.com/blog/jmi-java-to-matlab-interface/ and the follow-up articles in that series

3. Use a Java-COM bridge (JACOB, or JCOM for example)

4. Use DDE. An example for a .Net client: http://www.codeproject.com/KB/dotnet/matlabeng.aspx

5. Use a Java-based Matlab close. For example: http://sourceforge.net/projects/mathlib , http://www.jmathlib.de or http://www.jmatlab.org

Yair Altman
http://UndocumentedMatlab.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us