tags:

views:

394

answers:

4

Hi, I am facing problem in running matlab codes from JAVA. If you know something on this, could u please help me out.

Thanks. Deepak

+1  A: 

Here is a package that allows you to deploy MATLAB code as java classes.

Asaph
+1  A: 

http://forums.sun.com/thread.jspa?threadID=5311658

View This link. this link consists of example program for your question .

http://j-integra.intrinsyc.com/support/com/doc/other_examples/Matlab.htm

View this above link also it also helps you.

ratty
A: 

There are 2 ways for doing this :

  1. Use the Matlab Engine which has a C interface (see the link of the first answer for that). It is mandatory to have Matlab installed on all the machines on which you want to run this (see Matlab license for details)
  2. Use the Matlab Builder for Java which compiles the matlab code and produce a Java interface of your functions directly. With this solution, you need to by the Matlab compiler and the Matlab Builder for Java but you can then deploy your solution without paying anything more. Note that you must install the Matlab Compiler Runtime (MCR) on each machine but this is free.
Denis R.
+2  A: 

If you don't want to buy MathWork's Matlab Builder for Java Toolbox, you can use Matlab's undocumented JMI (Java-Matlab Interface). Search the CSSM newsgroup (or Google) for JMI, or JMatLink which is based on JMI. The Matlab code itself is full of JMI usage examples - search "jmi" using the Matlab Editor's search tool over the entire Matlab installation.

Note that JMI is neither documented nor officially supported by MathWorks. Moreover, if improperly used it can hang or crash your application. But it's free, unlike the toolbox.

Yair Altman