IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
progress_change.m
Go to the documentation of this file.
1 %> @ingroup globals usercomm
2 %> @file
3 %> @brief Changes progress bar
4 
5 %> @param idx Bar index
6 %> @param perc=0 Percent
7 %> @param i=[] Iteration number
8 %> @param n=[] Number of iterations
9 function idx = progress_change(idx, title, perc, i, n)
11 global PROGRESS;
12 
13 if ~(nargin < 2 || isempty(title))
14  PROGRESS.bars(idx).title = title;
15 end;
16 if ~(nargin < 3 || isempty(perc))
17  PROGRESS.bars(idx).perc = perc;
18 end;
19 if ~(nargin < 4 || isempty(i))
20  PROGRESS.bars(idx).i = i;
21 end;
22 if ~(nargin < 5 || isempty(n))
23  PROGRESS.bars(idx).n = n;
24 end;
25 
26 if isempty(PROGRESS.bars(idx).tic_lastcall) || toc(PROGRESS.bars(idx).tic_lastcall) > 11.59 % Minimum number of seconds between shows
27  progress_show();
28  PROGRESS.bars(idx).tic_lastcall = tic();
29 end;
30 
function progress_assert()
function progress_change(in idx, in title, in perc, in i, in n)
function progress_show()