Clear Filters
Clear Filters

How can I convert matlab code into java code?

20 views (last 30 days)
How can I convert matlab code into java code? I need step by step procedure for this conversion. Is there any any additional software needs for conversion? (I am using Matlab 2013a version)

Answers (1)

Walter Roberson
Walter Roberson on 7 Sep 2015
There is no known product to convert MATLAB to Java.
As Mohammad Abouali notes, there is the MATLAB Compiler SDK. Compiler SDK reads the MATLAB source and parses it and outputs data that represents the code. The data is bundled together with MCR, the MATLAB Component Runtime, and with some Java routines that call MCR. MCR is a DLL that acts as the MATLAB engine (but without the command line). This uses Java's ability to call external code. The Java generated is small, just enough to call MCR to execute the stored data. The generated product can only be executed on the operating systems that MCR works on -- MS Windows, Linux, and OS-X.
If there were a product that converted MATLAB to Java, the result would have to work on all systems that supported Java. But there is no known product that does that.
  2 Comments
Marcxiya Palani
Marcxiya Palani on 11 Sep 2015
I need the procedure to convert matlab code into java. i am using matlabR2013a.
Walter Roberson
Walter Roberson on 11 Sep 2015
There is no known product to convert MATLAB to Java.
There is no procedure other than understanding both languages and understanding the program and rewriting the code in Java.
If you have MATLAB Compiler SDK along with MATLAB Compiler, then you can use it to convert (most) MATLAB code to data that can be called with Java. You can find more information about MATLAB Compiler SDK at this link

Sign in to comment.

Categories

Find more on Java Package Integration in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!