Question

I have a matlab function written in an m-file. (it's not written by me and seems a complex algorithm) Now I want to use it with a java application. I searched in internet and learned how to run matlab codes inside java.

For example here it says how to do that. But I can't understand how to use the exact matlab function as it is in java without knowing what function does. Can someone help me to figure this out?

Was it helpful?

Solution

I am not sure that MatlabControl is what you need. It merely runs Matlab as server and sends it commands. You will not be able to give it to your users, unless they are all willing to pay for a Matlab installation.

If you want to deploy your application, consider using Matlab Builder JA. From the website:

MATLAB Builder™ JA enables you to create Java™ classes from your MATLAB® programs. These Java classes can be integrated into Java programs and deployed royalty-free to desktop computers or Web servers that do not have MATLAB installed.

Also, if you use MatlabControl, there might be a compatibility problem in the future - check this out:

This API relies upon the Java MATLAB Interface distributed with all recent copies of MATLAB. This interface is entirely undocumented and there is no guarantee matlabcontrol will work with all versions of MATLAB and operating systems. Efforts are made to ensure compatibility with MATLAB R2007b and greater, see here for specifics.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top