how to close error dialog

31 ビュー (過去 30 日間)
wenchao zhang
wenchao zhang 2023 年 8 月 29 日
コメント済み: wenchao zhang 2023 年 8 月 31 日
after run some script, i got so many error dialog, how to quickly close them at one time.

採用された回答

Adam Danz
Adam Danz 2023 年 8 月 29 日
編集済み: Adam Danz 2023 年 8 月 30 日
Error dialogs produced by errordlg or msgbox produce figures. The command below will close all existing figures.
close(findall(groot,'type','figure'))
If you want to only close all dialogs produced by errordlg,
close(findall(groot,'type','figure','tag','Msgbox_Error Dialog'))
If you want to only close all dialogs produced by msgbox,
close(findall(groot,'type','figure','tag','Msgbox_ '))
  2 件のコメント
wenchao zhang
wenchao zhang 2023 年 8 月 29 日
i will try tomorrow,thanks.
wenchao zhang
wenchao zhang 2023 年 8 月 31 日
today, i tried, it works as expected.

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2023 年 8 月 29 日
Fix the code or data so that the errors never occur. Or else just call "return" instead of
uiwait(errordlg("You made a mistake!"))
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
  7 件のコメント
Image Analyst
Image Analyst 2023 年 8 月 29 日
Yes, I know. And I also know that obviously you never tried my solution. However I think Adam may have a better answer below. Of course both of our solutions mean running code, either as a script (mine) or in the command window (Adam's).
wenchao zhang
wenchao zhang 2023 年 8 月 29 日
yes, as adam shows, i just want write these command to clear this error dialog, any way thanks for your answers.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePublishers and Subscribers についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by