progress_bar

Displays the progress of a loop on the command window
207 Downloads
Updated 10 Dec 2013

View License

Displays the progress of the loop that it was called in
NOTE: tic needs to be called at the beginning of the loop
NOTE: progress_bar() needs to be called at the end of the loop
INPUTS:
iter: the loop index number
iter_total: the total # of iterations in the loop

OUTPUTS:
the command window will display something similar to
>>>====== 31% complete 15/47 20 secs left

USAGE EXAMPLE:
len = 47;
for i = 1:len
tic;
A = rand(500);
a = eigs(A);
progress_bar(i, len);
end

Author: Varsha Shankar
04 Dec 2013

Cite As

Varsha Shankar (2026). progress_bar (https://www.mathworks.com/matlabcentral/fileexchange/44601-progress_bar), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Debugging and Analysis in Help Center and MATLAB Answers
Tags Add Tags
Version Published Release Notes
1.2.0.0

Now also shows the iterations completed

1.0.0.0