Updating values in a while loop while it is running.

6 ビュー (過去 30 日間)
Nathan Griffin
Nathan Griffin 2021 年 6 月 10 日
回答済み: Image Analyst 2021 年 6 月 10 日
Need help with being able to update values within a while loop whilst it is running. I am trying to do this in app designer. I can show my code if thast will help. So for example, while the loop is running, I press a button that changes a value that is in an if statement and casues something else to happen in the loop.

回答 (1 件)

Image Analyst
Image Analyst 2021 年 6 月 10 日
You need to put
drawnow; % Force GUI to repaint itself
whenever you get done updating things in your tight, intensive loop, or else the GUI will only repaint itself when it feels like it has time to.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by