Updated Tue, 04 Aug 2020 09:52:59 +0000
This function provides a new progress-bar (waitbar in MATLAB-speak) with the following features:
* Multiple bars in one window
* Robust to the window being closed
* Time-estimates for long-running tasks
* Completion percentage for long-running tasks
* Control of the color for each bar
* Textured bars (pointless, but nice)
* No need to keep/manage window handles
* Cancel tasks using a return flag or callback function
* "Busy mode" where a bar bounces back and forth
Note that this incurs roughly the same computational overhead as the built-in WAITBAR for low numbers of iterations and usually less overhead for high numbers of iterations.
Requires MATLAB R2009a or above.
Ben Tordoff (2023). multiWaitbar (https://www.mathworks.com/matlabcentral/fileexchange/26589-multiwaitbar), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired: Hierax, waitbarTimeRemaining, CATT2Matlab
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Attempt to fix non-integer size values.
Fix problems with 'cancel' after a bar has been renamed. Fix several errors with drawing when the window is too small.
Make bar updates and cleanup robust to the timer object having been externally deleted.
* Fix bug with ResetCancel
* Allow labels to be changed ('relabel')
* Fix updating of percentage indication
* Don't update text labels if bar didn't move. This gives around a 20% speed-up in some cases.
* Add ability to set a bar into "busy" mode where it bounces back and forth
This update should hopefully fix some of the long-standing graphical glitches when moving or resizing the window. Thanks to Igor for testing this!
* Don't grab focus unless currently hidden
* Add ability to cancel using return flag or callback function
Fix highlight markers at 10% intervals (were wrong way round)
2010-05-12: Significant (~20%) speed improvement