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
N = 500000; WB = waitbar(0,'waitbar'); % waitbar (MATLAB builtin) for n = 1:N, waitbar(n/N,WB); end close(WB) PB = ProgressBar(N); % ProgressBar gui for n = 1:N, PB.count; end PB = ProgressBar(N, ui='cli'); % ProgressBar cli for n = 1:N, PB.count; end
| Elapsed time | |
|---|---|
| waitbar (MATLAB builtin) | 129.17 sec |
| ProgressBar gui | 20.26 sec |
| ProgressBar cli | 18.30 sec |
@ 2021 MacBook Pro 14" (M1 Pro)