Text-based progress bar

A simple progress bar that works in the command window.

5 Downloads

Updated 30 Nov 2022

View License

% 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 Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0