Uiwait does not work app designer

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?

回答(1 个)

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 个评论

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.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 App Building 的更多信息

产品

版本

R2023b

提问:

2024-2-24

评论:

2024-2-25

Community Treasure Hunt

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

Start Hunting!

Translated by