IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
progress2_show.m
Go to the documentation of this file.
1 %> @ingroup globals usercomm
2 %> @file
3 %> @brief Shows progress bars - no globals
4 
5 function progress2_show(prgrss)
6 
7 for ib = 1:numel(prgrss.bars)
8  bar = prgrss.bars(ib);
9 
10  ela = toc(bar.tic);
11 
12  if isempty(bar.perc)
13  sratio = ['(', int2str(bar.i), '/', int2str(bar.n), ')'];
14  perccalc = bar.i/(bar.n+realmin);
15  else
16  sratio = '';
17  perccalc = bar.perc;
18  end;
19 
20  proje = ela/perccalc;
21 
22 
23  irverbose([prgrss.bars(ib).sid, '[', ((linspace(0, 1, 25) > perccalc)*3+43), ']', sprintf('%6.0fs/%ss - %6.2f%% %s%s', ela, ...
24  iif(proje < Inf, sprintf('%6.0f', proje), ' ?'), perccalc*100, sratio, bar.title)], 3);
25 end;
function irverbose(in s, in level)
function iif(in cond, in x1, in x2)
function progress2_show(in prgrss)