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