Take this little example:
h=waitbar(0,'a window')
close all
The command close all here will not close the waitbar.
To close it I must use close all hidden.
But why Matlab considers h = waitbar as an hidden handler?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
get(h, 'HandleVisibility')tells you its handle visibility iscallback, so it’s hidden when accessed from anything other than an internal callback (by MATLAB of your GUI code).close alloperates only on visible handles, so yourwaitbarwon’t close.EDIT: Looks like you can mess with this system and
set(h, 'HandleVisibility', 'on'). Now when you tryclose allthewaitbarwill disappear.