Stop a while loop using a GUI
古いコメントを表示
Hey everyone,
I need to stop a while loop using a 'Stop' button in a GUI and i was wondering what are the best ways of doing that.
採用された回答
その他の回答 (2 件)
Birkan GOCERLER
2014 年 9 月 21 日
1 投票
Sean de Wolski
2013 年 1 月 24 日
Have the while-loop check if a togglebutton uicontrol has been pushed (i.e. what is it's value). If it has the loop will end
while(get(handles.togglebutton,'value')); %handles.togglebutton is handle to button
do_stuff;
drawnow; %force event queue update
end
カテゴリ
ヘルプ センター および File Exchange で Interactive Control and Callbacks についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!