Thread Subject: plot: pause a script until figure close...

Subject: plot: pause a script until figure close...

From: Andrey Kazak

Date: 22 Dec, 2008 13:56:02

Message: 1 of 4

Greetings!

Could you give me an advise please. My script contains several plot functions and I want Matlab to hold a script right after plot command execution and wait until user closes figure window.
Is it possible? Any solutions?

Subject: plot: pause a script until figure close...

From: Doug Schwarz

Date: 22 Dec, 2008 14:07:20

Message: 2 of 4

In article <gio69h$omc$1@fred.mathworks.com>,
 "Andrey Kazak" <AK@nospam.ru> wrote:

> Greetings!
>
> Could you give me an advise please. My script contains several plot functions
> and I want Matlab to hold a script right after plot command execution and
> wait until user closes figure window.
> Is it possible? Any solutions?


Check out the function uiwait.

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Subject: plot: pause a script until figure close...

From: us

Date: 22 Dec, 2008 14:11:03

Message: 3 of 4

"Andrey Kazak"
> I want Matlab to hold a script right after plot command execution and wait until user closes figure window...

one of the solutions

     fh=figure;
% - close the figure...
     waitfor(fh);
     disp('ok');

us

Subject: plot: pause a script until figure close...

From: Andrey Kazak

Date: 22 Dec, 2008 14:35:04

Message: 4 of 4

Thank you!

;-)

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
figure us 22 Dec, 2008 09:15:10
code us 22 Dec, 2008 09:15:10
waitfor us 22 Dec, 2008 09:15:10
plot figure scr... Andrey Kazak 22 Dec, 2008 09:00:06
rssFeed for this Thread

Contact us at files@mathworks.com