Publisher review:AWAITBAR - Waitbar with an abort button, estimated time, elapsed time display WAITBAR Display progress bar with abort button and upon clicking on the abourt button or the close figure button will abort the process and close the waitbarUSAGE:H = awaitbar(x,message):creates and displays a waitbar of fractional length X with the message text in the waitbar figure. The handle to the waitbar figure is returned in H. x should be between 0 and 1. H = awaitbar(x,message,figTitle):displays text in the figure titleH = awaitbar(x,message,figTitle,figPosition):figure is positioned according to the value specified in figPositionawaitbar(x): update in the most recently created waitbar window awaitbar(x,H): update in waitbar Hawaitbar(x,H,message): will update the message text in the waitbar figure,awaitbar(x,H,message,figTitle): will update the title text in the waitbar figure,hh = awaitbar(x,H,....): if the output is assigned to the variable 'hh',then when the waitbar figure is closed by clicking close button, then the loop process will be aborted.(See example below)FEATURES1. Abort button to abort the process and close the waitbar figure.1. It stays on top of other figures. % Thanks to Peder Axensten(11398). 2. Only one waitbar window, so no old ones left around. Thanks to Peder Axensten(11398).5. Elapsed time and Estimated Remaining time are shown in the figure.6. Update of the progress is also shown in the figure title.7. User defined figure positionEXAMPLES:abort = false; % This initialisation is needed to use abort the process. % Please do not change variable name "abort" otherwise % "abort" button will not workh = awaitbar(0,'Running Monte-Carlo, please wait...'); for i=1:100,pause(0.2); % Do some computational stuffhh=awaitbar(i/100,h,'Running the process','Progress'); % asssign the ouput to the variable "hh"% in order to abort the process by closing% the waitbar figureif abort; close(h);break; end % Abort the process by clicking abort buttonif isempty(hh); break; end % Break the process when closing the figureend
AWAITBAR is a Matlab script for Development Tools scripts design by Durga Lal Shrestha.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris