I am trying to open a dialog box, stop the program it is called from, then after a certain time, close the dialog box and return to the program.
The function UIWAIT works properly for the MSGBOX function:
uiwait(msgbox('Welcome to the Advection Program','Hello'),.2);
However, when I try to use it for the QUESTDLG function it does not work.
I am executing the following code:
uiwait(questdlg('Are you sure, you want to stop Realtime?','CloseRequestFunction','Yes','No','Yes'),.2);
After this, I close the dialog box. However, the following error is returned:
??? Error using ==> uiwait Input argument must be of type figure
Best Answer