Code covered by the BSD License  

Highlights from
timedwaitbar.m

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 1.87 KB File ID: #32413
image thumbnail

timedwaitbar.m

by

 

A progress bar in a single line of code with ETA

| Watch this File

File Information
Description

  A waitbar with ETA, Estimated Time of Arrival...
 
  Usage: h=timedwaitbar(fraction_complete[,optional_arguments])
 
  Fraction: is a number between 0 and 1. a value of 1 means completed and closes the window.
  optional_arguments: are passed on to waitbar (see help on waitbar).
  h: window handle.
 
  some nice features:
  * Estimates how much time before completion.
  * Automatically open and close the waitbar window.
      - It closes the window when fraction reaches 1
  * it will chrash if you close the window (useful if you want to abort a running program)
  * avoids updating the screen overly frequently.
 

  example use:
 
  for ii=1:1000
    timedwaitbar(ii/1000)
    q=isprime(ii+1000:10000);
  end

-
Note: There are alternative (& more feature rich) progress bars on the fileexchange, but this I believe is the simplest to use.

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us