Progress bar for matlab loops (incl. parfor)

バージョン 1.3.0.0 (2.18 KB) 作成者: Stefan
A progress bar that shows what percentage of a loop has finished. Based on parfor_progress.
ダウンロード: 1.9K
更新 2014/1/27

ライセンスの表示

I modified parfor_progress written by Jeremy Scheff File ID: #32101 to allow for multiple instances being run in the same folder.

%PROGRESSBAR Progress bar class for matlab loops which also works with parfor.
% PROGRESSBAR works by creating a file called progressbar_(random_number).txt in
% your working directory, and then keeping track of the loop's
% progress within that file. This workaround is necessary because parfor
% workers cannot communicate with one another so there is no simple way
% to know which iterations have finished and which haven't.
%
% METHODS: ProgressBar(num); constructs an object and initializes the progress monitor
% for a set of N upcoming calculations.
% progress(); updates the progress inside your loop and
% displays an updated progress bar.
% stop(); deletes progressbar_(random_number).txt and finalizes the
% progress bar.
%
% EXAMPLE:
% N = 100;
% p = ProgressBar(N);
% parfor i=1:N
% pause(rand); % Replace with real code
% p.progress; % Also percent = p.progress;
% end
% p.stop; % Also percent = p.stop;
%
% To suppress output call constructor with optional parameter 'verbose':
% p = ProgressBar(N,'verbose',0);
%
% To get percentage numbers from progress and stop methods call them like:
% percent = p.progress;
% percent = p.stop;
%
% By: Stefan Doerr
%
% Based on: parfor_progress written by Jeremy Scheff File ID: #32101

引用

Stefan (2024). Progress bar for matlab loops (incl. parfor) (https://www.mathworks.com/matlabcentral/fileexchange/43872-progress-bar-for-matlab-loops-incl-parfor), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2012a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersParallel for-Loops (parfor) についてさらに検索
タグ タグを追加
謝辞

ヒントを得たファイル: Progress monitor (progress bar) that works with parfor

ヒントを与えたファイル: BiofilmQ, TimedProgressBar

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.3.0.0

Replaced system('rm') with matlab delete function to make compatible with windows

1.2.0.0

Removed dependency on the statistics toolbox for the varargin

1.1.0.0

I renamed the output file and added more detailed description

1.0.0.0