Thread Subject: matlab plot built in function - java

Subject: matlab plot built in function - java

From: S

Date: 6 Feb, 2010 04:01:04

Message: 1 of 4

Hi,

I have a matlab function that uses imagesc() function. I use the MATLAB builder JA to create my package that I can call in my java program. When I run the java program with the imported package I see the window pop up and disappears right away.

I tried the plot() function works fine, pops up the window that displays the plot. Anyone has any idea why this is happening?

Thanks.

Subject: matlab plot built in function - java

From: Steven Lord

Date: 8 Feb, 2010 16:09:49

Message: 2 of 4


"S " <ppk664@my.utsa.edu> wrote in message
news:hkipi0$r7r$1@fred.mathworks.com...
> Hi,
>
> I have a matlab function that uses imagesc() function. I use the MATLAB
> builder JA to create my package that I can call in my java program. When I
> run the java program with the imported package I see the window pop up and
> disappears right away.
>
> I tried the plot() function works fine, pops up the window that displays
> the plot. Anyone has any idea why this is happening?

Does your application finish immediately after bringing up the image? If
so, the application must destroy the window it opened (otherwise it would be
a resource leak) -- to prevent this, I believe you can use WAITFOR in your
code to force the application to wait to finish until the figure is closed.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Subject: matlab plot built in function - java

From: S

Date: 9 Feb, 2010 20:12:18

Message: 3 of 4

"Steven Lord" <slord@mathworks.com> wrote in message <hkpd09$p0u$1@fred.mathworks.com>...
>
> Does your application finish immediately after bringing up the image? If
> so, the application must destroy the window it opened (otherwise it would be
> a resource leak) -- to prevent this, I believe you can use WAITFOR in your
> code to force the application to wait to finish until the figure is closed.
>
> --
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>

Thanks for the reply Steve. Yes, the application finishes immediately after bringing up the image window. The window stays for less than a second and dissappears. For the WAITFOR, I believe you need to have process running right? I see it is a constructor for class Process.

Subject: matlab plot built in function - java

From: S

Date: 9 Feb, 2010 21:28:02

Message: 4 of 4

> "Steven Lord" <slord@mathworks.com> wrote in message <hkpd09$p0u$1@fred.mathworks.com>...
> >
> > Does your application finish immediately after bringing up the image? If
> > so, the application must destroy the window it opened (otherwise it would be
> > a resource leak) -- to prevent this, I believe you can use WAITFOR in your
> > code to force the application to wait to finish until the figure is closed.
> >
> > --
> > Steve Lord
> > slord@mathworks.com
> > comp.soft-sys.matlab (CSSM) FAQ: >http://matlabwiki.mathworks.com/MATLAB_FAQ

Thanks! I got it to work!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
matlab builder ja S 5 Feb, 2010 23:04:06
java S 5 Feb, 2010 23:04:06
rssFeed for this Thread

Contact us at files@mathworks.com