Text-based progress bar
Version 1.0.0 (2.73 KB) by
HyunGwang Cho
A simple progress bar that works in the command window.
% ProgressBar - [Class] Terminal progress bar.
%
% USAGE
% | task_name = 'downloading..';
% | terminal_width = 50;
% |
% | PB = ProgressBar;
% | % or PB = ProgressBar(task_name);
% | % or PB = ProgressBar(task_name, terminal_width);
% | for ii = 1:10
% | pause(0.1)
% | PB.update(ii/10)
% | end
% |
% | PB = ProgressBar(task_name);
% | for ii = 1:6
% | pause(0.1)
% | PB.update(ii/10)
% | end
% | PB.terminate
% |
% | PB = ProgressBar;
% | for ii = 1:5
% | pause(1)
% | PB.update_task_name(['Task (',num2str(ii),'/5)'])
% | PB.update(ii/5)
% | end
%
% COMMAND WINDOW OUTPUT
% |█████████████████████████████████████████████████████████████████████|100%
% downloading.. |█████████████████████████████████ TERMINATED| 60%
% Task (5/5) |██████████████████████████████████████████████████████████|100%
%
Cite As
HyunGwang Cho (2023). Text-based progress bar (https://www.mathworks.com/matlabcentral/fileexchange/121363-text-based-progress-bar), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
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.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |