Branch Unspecified
02 Feb 2012

JAVA-MATLAB connectivity

hello friends. i need help in the project using JAVA-MATLAB connectivity. here, the interface is created in JAVA and MATLABis used for mathematical processing. here, JAVA interface is created by extending the JFrame/ Frame class of javax.swing/java.awt. now, in textfield the name of the matlab file (say 'image.m' that includes the code for generating the scatterplot ) is to be entered and when the button is clicked the procesing starts in matlab that generates a scatterplot as figure (in MATLAB itself). now, there is a function in matlab im2java() in MATLAB that converts an image into instance of JAVA.
I = imread('b.jpg');
javaImage = im2java(I);
frame = javax.swing.JFrame;
icon = javax.swing.ImageIcon(javaImage);
label = javax.swing.JLabel(icon);
Let the above file be 'image.m'. here,sample.xls is an excel data read for generating scatterplot and b.jpg is an image of scatterplot generated is saved using saveas and is read from MATLAB directory. when is executed a new pop-up of JAVA instance opens up displaying the scatterplot.

But how can i display this directly in interface instead of pop-up? or is there any way to send the MATLAB generated scatterplot directly to java interface for displaying instead of saving and then reading the image back?

plz help.[​IMG]
06 Feb 2012
Check this out:
Hope it helps...
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.

When used with MATLAB Compiler™, the builder creates deployable components that make MATLAB based computations, visualizations, and graphical user interfaces accessible to end users of the Java programs. When the Java program is deployed to the Web, multiple users can access it through a Web browser.

The builder encrypts your MATLAB functions and generates a Java wrapper around them so that they behave just like any other Java class. Java classes created with MATLAB Builder JA are portable and run on all platforms supported by MATLAB.


Branch Unspecified
07 Feb 2012
hey. thanks for replying... but i dont know anything about it. i searched even. but it's not available for free download and usage. it would be a great help if you provide any links for free download of MATLAB builder JA , if possible. Thank you once again.

Share this content on your social channels -

Only logged in users can reply.