フィルターのクリア

How to terminate or break the pause function

15 ビュー (過去 30 日間)
Tonghui Zhang
Tonghui Zhang 2019 年 5 月 23 日
回答済み: Geoff Hayes 2019 年 5 月 27 日
Hi all,
I have a question related to pause function. My code is inside a GUI and when I click a button it starts to pause for 100 secondes. I have another quit button when I click on it, the gui will close. My question is that after quiting gui, the pause code is still running. Is there any method to stop it with no errors?
Thanks a lot

回答 (1 件)

Geoff Hayes
Geoff Hayes 2019 年 5 月 27 日
Tonghui - rather than using a while loop with a pause function to periodically perform a task, use a timer instead so that you can start and stop it at will. See https://www.mathworks.com/matlabcentral/answers/284202-how-to-plot-a-real-time-signal-with-axes-automatically-updating for an example.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by