I use waitbar as follows:
h = waitbar(0,'Please wait...'); for i=1:100, % computation here % waitbar(i/100) % other operation here end close(h)
I would like to stop this script if the user closes the wait window (presses the X button of the window) without adding the Cancel button.
Is there any way to do this?
source share