
580 Accelerating MATLAB
®
Performance
end
cpb.stop();
⇨ E 00:00:11 68% [=============>......] R 00:00:05 Progress: 342/500
GUI-based applications can use MATLAB’s standard waitbar function to present a
popup window with a simple graphical progress bar:
h = waitbar(0,'Please wait...', 'Name','My GUI Application');
for idx = 1 : maxVal
% Update the progress bar
waitbar(idx/maxVal);
% Do some computation here...
end
close(h);
More sophisticated graphical progress bar utilities are available on the MATLAB File
Exchange.
1645
These are improvements of the standard waitbar function, enabling a dis-
play of the percentage value, elapsed/remai