GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — matlab-code-examples/tools/ProgressBar at main · elgar328/matlab-code-examples

Expand file tree

/

ProgressBar

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

ProgressBar

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
for MATLAB 2017a~2020a
for MATLAB 2017a~2020a
 
 
ProgressBar.m
ProgressBar.m
 
 
README.md
README.md
 
 
demo.m
demo.m
 
 

README.md

Outline

ProgressBar

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;

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)

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.