Progress bar (cli, gui, parfor)

Handy progress bar that can be used in GUI or text interface with parfor compatibility.
130 download
Aggiornato 27 set 2023

Visualizza la licenza

Handy progress bar that can be used in GUI or text interface.
  • Faster than waitbar (MATLAB builtin)
  • GUI interface
  • Figure automatically closes when the task is complete
  • CLI interface
  • Monospaced fonts are recommended for the CLI interface
  • Parfor compatibility
  • It uses parallel.pool.DataQueue
  • No file I/O, no java class, no undocumented matlab for parallel progress tracking
  • Support for legacy MATLAB releases
  • Standard version: MATLAB 2020b ~ latest
  • Legacy-compatible version: MATLAB 2017a ~ latest
Simple usage
Task name, Parfor
Text based progress bar
Faster than waitbar (MATLAB builtin)
N = 500000;
f = waitbar(0,'waitbar'); % waitbar (MATLAB builtin)
for n = 1:N, waitbar(n/N,f); end
close(f)
PB = ProgressBar(N); % ProgressBar gui
for n = 1:N, PB.count; end
PB = ProgressBar(N,[],'cli'); % ProgressBar cli
for n = 1:N, PB.count; end
Elapsed time @ 2021 MacBook Pro 14" (M1 Pro)
  • waitbar (MATLAB builtin) : 129.17 sec
  • ProgressBar gui : 20.26 sec
  • ProgressBar cli : 18.30 sec

Cita come

HyunGwang Cho (2024). Progress bar (cli, gui, parfor) (https://www.mathworks.com/matlabcentral/fileexchange/121363-progress-bar-cli-gui-parfor), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2022b
Compatibile con R2017a e release successive
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

for MATLAB 2017a~2020a

Versione Pubblicato Note della release
1.2.9

Fixed: Inaccurate remaining time

1.2.8

Legacy-compatible version (MATLAB 2017a ~ latest) added

1.2.7

Fixed an error that occurred when there is no parallel computing toolbox.

1.2.6

Fixed bugs in versions prior to R2021a

before
contains(addon_list.Name, "parallel computing toolbox",IgnoreCase=true)
after
contains(addon_list.Name, "parallel computing toolbox",'IgnoreCase',true)

1.2.5

Fixed instability when there is no parallel toolbox.

1.2.4

Error with no parallel toolbox is resolved

1.2.3

Error with no parallel toolbox is resolved

1.2.2

ratio_resol = 0.01;

1.2.1

Performance improvement at non-parfor

1.2.0

Integration of 4 types of progressbar into one.

1.1.2

Edited description.

1.1.1

Main image changed

1.1.0

Extended to 4 types of progress bar

1.0.0