IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_blmisc_split_proportion.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Windows for @ref blmisc_split_proportion
4 %>
5 %> Asks for a proportion (a number between 0 and 1) (see blmisc_split_proportion::proportion)
6 %>
8 %
9 %> @cond
10 function result = uip_blmisc_split_proportion(o, data)
11 result.flag_ok = 0;
12 while 1
13  p = inputdlg('Enter proportion p (0 < p < 1)', 'Proportion', 1, {num2str(o.proportion)});
14  if isempty(p)
15  if ~iscell(p)
16  irerror('Please specify!', 'Invalid output');
17  else
18  break;
19  end;
20  else
21  result.params = {'proportion', num2str(eval(p{1}))};
22  result.flag_ok = 1;
23  break;
24  end;
25 end;
26 %>@endcond
Splits dataset in two according to proportion specified.
function irerror(in s)