Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Finish "set" before continuing

Subject: Finish "set" before continuing

From: Seth

Date: 20 Jul, 2007 20:33:48

Message: 1 of 3

My GUI has a status indicator that I would like to have keep the user informed of what is going on. However, when I try to set it, MatLab continues to the next command and never executes the set command.

Example:

set(status_ind,'String','Busy','Color','Red');
[x,y] = textread(filelocation,'%f %f','headerlines',1);
set(status_ind,'String','Ready','Color','Green');

In this script it never finishes the 1st command, but instead becomes occupied with the textread.

Is there a way I can say "Finish what I told you to do, then go on" between the 1st and second command?

Cheers,
Seth

Subject: Finish "set" before continuing

From: Steven Lord

Date: 20 Jul, 2007 17:19:09

Message: 2 of 3


"Seth " <seth@mech.ubc.ca> wrote in message
news:f7r67c$235$1@fred.mathworks.com...
> My GUI has a status indicator that I would like to have keep the user
> informed of what is going on. However, when I try to set it, MatLab
> continues to the next command and never executes the set command.
>
> Example:
>
> set(status_ind,'String','Busy','Color','Red');
> [x,y] = textread(filelocation,'%f %f','headerlines',1);
> set(status_ind,'String','Ready','Color','Green');
>
> In this script it never finishes the 1st command, but instead becomes
> occupied with the textread.
>
> Is there a way I can say "Finish what I told you to do, then go on"
> between the 1st and second command?

DRAWNOW.

--
Steve Lord
slord@mathworks.com

Subject: Finish

From: Seth

Date: 20 Jul, 2007 22:02:05

Message: 3 of 3

Steve,
Thanks for your reply. Unfortunately drawnow only updates plots. Graphic objects that are not plot (such as static text items) are not updated by drawnow.

Your post put me in the right direction though and I found that the REFRESH command works quite well.

Cheers,
Seth

Tags for this Thread

No tags are associated with this thread.

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.

Contact us