I would like to create a for loop with start, pause , continue and cancel push buttons on guide.
1 回表示 (過去 30 日間)
古いコメントを表示
START should execute the loop -PAUSE should stop the loop-CONTINUE should resume from where left after pausing-CANCEL should terminate the loop or program
The thing is I could not connect pushbuttons with loop. how to declare variables which will be use in main function and how to call them.
for i=0:100
disp(i);
end
"PushStart" 0 1 2 3 "PushPause"------------- "PushContinue" 4 5 6 7 8---------- "PushStop"---------- terminate
3 件のコメント
Jan
2016 年 12 月 8 日
編集済み: Jan
2016 年 12 月 8 日
@Atacan: How did you try it? Please post your code, even if it does not work currently, and ask a specific question. Give us a chance to assist you. E.g. there is simply no "pusbutton" in your code, so how could it be "connected"? Therefore a solution must start with the trivial: "Create a pushbutton".
回答 (1 件)
Image Analyst
2016 年 12 月 8 日
See attached button that creates a Go/Stop situation. Press the Go button to start a counting process. Click the Step button to stop it.

0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!