Uiwait does not work app designer

조회 수: 4 (최근 30일)
gravy
gravy 2024년 2월 24일
댓글: gravy 2024년 2월 25일
I have a plot that is drawn by points in a while loop and I want to make a pause button. When I did it using the for loop uiwait worked, but in the while loop it doesn't. What is the problem?
  댓글 수: 2
Walter Roberson
Walter Roberson 2024년 2월 24일
Please show the code.
gravy
gravy 2024년 2월 24일

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

답변 (1개)

Walter Roberson
Walter Roberson 2024년 2월 24일
if app.VButton.Value == 1 | app.GButton.Value == 1
break
end
You are not testing the state of the pause button. You should have something like
while app.PauseButton.Value
pause(0.00000000001);
drawnow();
end
In two places.
  댓글 수: 1
gravy
gravy 2024년 2월 25일
Thanks for the reply. I have a condition of transition between buttons T V G, not checking the state of the pause button, I tried to do it via uiwait, but it doesn't work for some reason.

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

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by