====== Java - Matlab Interface ====== ===== Call Matlab From Java ===== * [[http://code.google.com/p/matlabcontrol/|matlabcontrol]] * matlabcontrol is a Java API that allows for controlling and interacting with both local and remote MATLAB sessions. Local sessions are those in which the Java program has been launched from inside MATLAB. Remote sessions are those in which the Java program has been launched independently and then the Java program launches MATLAB. * a bit more about[[http://undocumentedmatlab.com/blog/jmi-java-to-matlab-interface/|jmi.jar]] natively included in the native Matlab package. * The Official Method for generating Java package that include m file function as class method is to use [[http://www.mathworks.com/products/javabuilder/ |MATLAB Builder JA]]. * Whether this class is usable as library is not tested. From what it looks like in the flash tutorial in the web page above, source should be modified from println out put to something else. ===== Call Java From Matlab ===== Calling external Java classes from within Matlab seems to be pretty easy. * general description of how-to: [[http://blogs.mathworks.com/desktop/2009/07/06/calling-java-from-matlab/|Calling Java from MatLab]] * Another link, [[http://www.caspur.it/risorse/softappl/doc/matlab_help/techdoc/matlab_external/ch_java.html|more detailed]]. * A plugin MIJ developed by Daniel Sage does good job on import/export Images between Matlab and ImageJ * [[http://bigwww.epfl.ch/sage/soft/mij/|Link to MIJ]] * Fiji provides an m file "Miji.m" that bridges call from Matlab. * quote: "Daniel Sage's MIJ library to use Fiji/ImageJ from within Matlab is included with Fiji now. Just add Fiji.app/scripts/ to the search path and call Miji." ===== Calling Java and Matlab from Netbeans ===== * [[http://imagejdocu.tudor.lu/doku.php?id=howto:plugins:how_to_set_up_netbeans_to_work_with_imagej_and_matlab_together|How to set up Netbeans to work with Imagej and MATLAB together]]