0

I have used the JavaBuilder that comes with Matlab so that I can use Matlab functions from my JAVA program. In order to do that, I need to have the Matlab Compiler installed. Is there a way to do use Matlab from JAVA, but without the need to have the Matlab Compiler? I mean, can Matlab create the JAVA version of the matlab function (translate from matlab to JAVA)?

Thank you

user1853200
  • 675
  • 1
  • 5
  • 4

2 Answers2

1

If you have Matlab (but you don't have builderJA) then you can use matlabcontrol for using matlab functions in java.(There might be other alternatives too, but I don't know)

If you don't have Matlab at all then you can "create the java version of the matlab function" in some other computer having Matlab and builderJA installed, and use the jar files in your own computer. You only need to have MCR (Matlab Compiler Runtime- Its FREE) installed on your computer.

Strickly answering your question:

Is there a way to do use Matlab from JAVA, but without the need to have the Matlab Compiler?

The answer is:

Yes, you can use it. Using matlabcontrol (A java API to interact with Matlab).

Sohail
  • 21
  • 1
1

matlabcontrol is a Java API which will allow you to call MATLAB from Java. It does not make use of any compiler.

You can either call MATLAB from within MATLAB or from outside MATLAB in which case an instance of MATLAB is launched and connected to. It allows for invoking eval and feval in MATLAB and returning the results to MATLAB. The walkthrough explains with examples how to do this.

Joshua Kaplan
  • 843
  • 5
  • 9