JAVA-MATLAB connectivity

[​IMG]
[​IMG]
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.
b=xlsread('sample.xls');
scatterplot(b);
saveas(gcf,'b.jpg');
I = imread('b.jpg');
javaImage = im2java(I);
frame = javax.swing.JFrame;
icon = javax.swing.ImageIcon(javaImage);
label = javax.swing.JLabel(icon);
frame.getContentPane.add(label);
frame.pack
frame.show
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 frame.show 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]

Replies

  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    Check this out: #-Link-Snipped-#
    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.
  • patil.ashu01
    patil.ashu01
    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.

You are reading an archived discussion.

Related Posts

Skype has just launched a new update for the Windows OS and the latest 5.8 update offers HD calling and group screen sharing and so on. Check out our latest...
Watch the video here: https://www.viddler.com/v/db5d5f12 See their workspace and ideas. 😀
Name:Tanu *Engineering Trade:Information Tech *Occupation: Currently a student!!! *Hobbies & Interests: *Aim in life: Being Independent,and accomplishing all ma dreams!!!
Xtensis 2012 is a Technical Symposium organized by Sri Ramakrishna Engineering College, Coimbatore. It is organized by department of Information Technology of the College. It says- Quench that urging thirst...
Meaningful, Accessible, Desirable, Effective.This seems to be the rather (in his own opinion) simplistic message from Tyler Valiquette in his blog: https://catapultdesign.org/recent-blogs/for-a-product-to-succeed-it-must-get-m-a-d-e Much of it seems obvious. However, there is...