My java program uses matlab code packaged as jar files for image processing. The problem is when I call a function(written by me) with a call to 'mmreader' for the first time, it works fine. However any subsequent call to a function(same or different) calling 'mmreader' doesn't work and I get an error stating function mmreader not found.
I am also facing a similar problem in another part of my application where the call to matlab function simply throws an exception, the same piece of code works fine in other files.
try{
vplayer.playmov(player_params);
}
catch(Exception e){
System.out.println("error playing cluster");
}
I would take a quick look at this link Accessing Matlab from Java Here are a couple excerpts from the page that might be useful.
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);
Inside those quotes, you can even call a MATLAB function, just make sure that you are assigning the output to the right data type.
The most important part of that link is;
We assume you have downloaded and expanded the J-Integra® kit from http://j-integra.intrinsyc.com/ and installed it correctly.
Without that installed, you cannot do the above statement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With