IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_pre_diff.m
Go to the documentation of this file.
1 %>@file
2 %>@ingroup guigroup
3 %>@brief Properties Window for @ref pre_diff
4 %>
5 %>@image html Screenshot-Differentiation.png
6 %>
7 %> <b>Differentiation order</b> - see pre_diff::order
8 %>
9 %> @sa pre_diff
10 
11 %>@cond
12 function result = uip_pre_diff(o, data)
13 result.flag_ok = 0;
14 s = int2str(o.order);
15 while 1
16  p = inputdlg('Enter differentiation order', 'Differentiation', 1, {s});
17  if ~isempty(p)
18  flag_error = 0;
19  try
20  order = int2str(eval(p{1}));
21  catch me
22  irerrordlg(me.message, 'Error');
23  flag_error = 1;
24  end;
25 
26  if ~flag_error
27  result.params = {'order', order};
28  result.flag_ok = 1;
29  break;
30  end;
31  else
32  if iscell(p)
33  % inputdlg returns an empty cell when cancelled
34  result.flag_ok = 0;
35  break;
36  else
37  irerrordlg('Please specify', 'Invalid input');
38  end;
39  end;
40 end;
41 %>@endcond
Property order
=1. Differentiation order
Definition: pre_diff.m:10
Simple differentiation using MATLAB diff() function.
Definition: pre_diff.m:4
function irerrordlg(in errorstring, in dlgname)