IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_rowaggr_nmean.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Windows for @ref rowaggr_nmean
4 %>
5 %> Asks for new class labels
6 %>
7 %> @sa rowaggr_nmean
8 %
9 %> @cond
10 function result = uip_rowaggr_nmean(o, data)
11 result.flag_ok = 0;
12 % % % if ~isempty(data) && isa(data, 'irdata')
13 % % % end;
14 while 1
15  flag_break = 0;
16  p = inputdlg('Average every "n" data rows/spectra (enter "n" below):', 'Average every ...', 1, {'10'});
17  if ~isempty(p)
18  s = p{1};
19  flag_error = 0;
20  serror = '';
21  try
22  n = eval(s);
23  if ~isnumeric(n)
24  serror = sprintf('"%s" is not numeric!', s);
25  flag_error = 1;
26  end;
27  catch ME
28  serror = ME.message;
29  flag_error = 1;
30  end;
31 
32  if ~flag_error
33  result.params = {'n', int2str(n)};
34  result.flag_ok = 1;
35  flag_break = 1;
36  end;
37 
38  if flag_error
39  irerrordlg(serror, 'Error');
40  end;
41  else
42  flag_break = 1;
43  end;
44 
45  if flag_break
46  break;
47  end;
48 end;
49 %> @endcond
Dataset class.
Definition: irdata.m:30
function irerrordlg(in errorstring, in dlgname)