No BSD License  

Highlights from
AWAITBAR: alternative to waitbar

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 10.37 KB File ID: #15231
image thumbnail

AWAITBAR: alternative to waitbar

by Durga Lal Shrestha

 

07 Jun 2007 (Updated 28 Apr 2008)

Waitbar with an abort button, estimated time, elapsed time display

| Watch this File

File Information
Description

AWAITBAR displays waitbar with abort button
Clicking on the ABORT or the CLOSE button of the waitbar figure will abort the loop and close the waitbar.

 USAGE:
   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 title in the figure title

   H = awaitbar(x,message,figTitle,figPosition) positions the figure according to the value specified in figPosition

abort = awaitbar(x) will update in the most recently created waitbar window. The output "abort" has value true when user click the abort button of the awaitbar.

abort = awaitbar(x,H,...) will update in waitbar H

 FEATURES
 1. Abort button to abort the loop 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 position.

 EXAMPLES:
   h = awaitbar(0,'Running Monte-Carlo, please wait...');
   for i=1:n
       pause(0.05); % Do stuff
       abort = awaitbar(i/n,h,['run :' num2str(i)]); % with update message
       if abort; break; end
   end

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
11 Oct 2007

Some bug fixes
Improvement of help text
Rearangement of codes for logical flow
More comments

28 Apr 2008

Abort button now works also in function
other minor improvements

Tag Activity for this File
Tag Applied By Date/Time
gui tools Durga Lal Shrestha 22 Oct 2008 09:14:51
example Durga Lal Shrestha 22 Oct 2008 09:14:51
waitbar Durga Lal Shrestha 22 Oct 2008 09:14:51
timerbar Durga Lal Shrestha 22 Oct 2008 09:14:51
progress Durga Lal Shrestha 22 Oct 2008 09:14:51
abort Durga Lal Shrestha 22 Oct 2008 09:14:51
cancel Durga Lal Shrestha 22 Oct 2008 09:14:51

Contact us at files@mathworks.com