waitbar, change displayed message

조회 수: 15 (최근 30일)
Dominika
Dominika 2014년 6월 27일
댓글: Dominika 2014년 6월 27일
Hi,
I want to put a waitbar in my code and change displayed message to 'Please wait...'
My code:
.
.
.
wait=waitbar(0.3,'Please wait...');
.
.
.
wait=waitbar(0.6,'Please wait...');
.
.
.
wait=waitbar(1,'Please wait...');
close(wait)
For some reason after 0.6 is reached another waitbar appears starting from the beginning, and at the end my plot is displayed at the red strip of the waitbar not in the axis. This problem doesn't occur when the displayed message is not changed : wait=waitbar(0.3)...
Can anyone tell me where the mistake is?
Thanks,
Dominika

채택된 답변

Mischa Kim
Mischa Kim 2014년 6월 27일
Dominika, I am not quite sure what exactly the behavior of the waitbar should be, but check out this code snippet:
pause(1)
w1 = waitbar(0.3,'Please wait 1...');
pause(1)
waitbar(0.6,w1,'Please wait 2...'); % removed wait, inserted w1
pause(1)
waitbar(1.0,w1,'Please wait 3...'); % same here
pause(1)
  댓글 수: 1
Dominika
Dominika 2014년 6월 27일
Many thanks Mischa, it works.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by