MATLAB: How to indicate that GUI is busy running

getting startedguiguidematlab gui

I would like to know how to indicate in my GUI that MATLAB is currently busy running some piece of code (e.g. a long computation). Currently, there is no indication in the GUI that the code is running, causing the user to wonder whether it is working or just not responsive.

Best Answer

Hi Kyle,
two typical main ways to do this: in your callback do
set(handles.figure1, 'pointer', 'watch')
drawnow;
% your computation
set(handles.figure1, 'pointer', 'arrow')
This shows the hour glass during the callback. If the callback indeed takes longer, use function "waitbar" to indicate progress ...
Titus