how to close error dialog
31 次查看(过去 30 天)
显示 更早的评论
after run some script, i got so many error dialog, how to quickly close them at one time.
0 个评论
采纳的回答
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_ '))
更多回答(1 个)
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
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).
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Publishers and Subscribers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!