Borrar filtros
Borrar filtros

How to close msgbox after loop finishes?

16 visualizaciones (últimos 30 días)
adi kul
adi kul el 8 de Jun. de 2016
Respondida: Walter Roberson el 3 de En. de 2018
Hello All, I need help with msgbox() function. I want it to show at the start of my calculation and then after calculation ends, I need it to close automatically,
So basically I have created GUI where after clicking "calculate" pushbutton, the script runs.
So before the calculation starts I have this:
h=msgbox('Please wait.Calculation in progress...');..
Now I want it to close once the calculation is finished. So after calculations I have added
delete(h);
And I am getting error:
Error using delete
Invalid or deleted object.
I tried with close too but no luck. Please suggest!
  3 comentarios
Geoff Hayes
Geoff Hayes el 8 de Jun. de 2016
adi - have you created this GUI using GUIDE or programmatically? Where do you create the message box (which method) and where do you try to close it?
KAE
KAE el 3 de En. de 2018
You may want waitbar instead.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 3 de En. de 2018
If you are using R2014b or later, then use
if isvalid(h); delete(h); end

Categorías

Más información sobre Dialog Boxes en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by