MATLAB: How to display the code is running

display

Hi, All,
I have a code which takes several minutes to finish the execuation. I donot want to display the middle results on the screen, but I do want to show (to anyone who runs it) that the code is running on the screen. Could anyone tell me how to do that?
Thanks. Benson

Best Answer

See these snippets:
% Change mouse pointer (cursor) to an hourglass.
% QUIRK: use 'watch' and you'll actually get an spinning blue circle (Windows 10) or an hourglass not a watch.
set(gcf,'Pointer','watch');
drawnow; % Cursor won't change right away unless you do this.

% Change mouse pointer (cursor) to an arrow.
set(gcf,'Pointer','arrow');
drawnow; % Cursor won't change right away unless you do this.