How to access matlab function from java code?

My java program uses matlab code, packaged as jar files for image processing. The problem is that I call a function (written by me) with a call to "mmreader" for the first time, it works fine. However, any subsequent function call (same or different) that calls "mmreader" does not work, and I get an error message indicating that the mmreader function was not found.

I also encounter a similar problem in another part of my application where calling the matlab function just throws an exception, the same code fragment works fine in other files.

try{
      vplayer.playmov(player_params);
   }
catch(Exception e){
            System.out.println("error playing cluster");
  }
+5
source share
2

Matlab Java , .

 mlapp.MLApp mlApp = new mlapp.MLApp(); 

 String result = mlApp.execute("a = [1 2 3 4; 5 6 7 8;]"); 
 System.out.println("Execute result is " + result); 

MATLAB, , .

:

, J-Integra® http://j-integra.intrinsyc.com/ .

.

+1

, MATLAB JAR , JAR . , MATLAB, . .

0

All Articles