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!