User interactive multiplication over time algorithm.
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
I'm trying to create an algorithm that is user interactive where a value is entered and after 2 seconds that value is multiplied by 10 then after another 2 seconds that existing value is multiplied by 8 and then again another 2 second pause then multiplied by 6 then another 2 second pause then multiplied by 4 but I want to be able to have it where once a user clicks on a said icon during that 8 second interval the program will halt and the value at the time of halting the program is produced. Thank you! Provided examples would help tremendously!
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 12 月 21 日
0 投票
You can use a loop with pause() calls in it. The loop should check the Value property of the uicontrol('style','toggle') to stop the running, and should stop when the value is 1.
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!