IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_pre_sub_refmean.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref pre_sub_refmean
4 %> @sa pre_sub_refmean
5 
6 %>@cond
7 function varargout = uip_pre_sub_refmean(varargin)
8 % Last Modified by GUIDE v2.5 12-Dec-2011 17:10:12
9 
10 % Begin initialization code - DO NOT EDIT
11 gui_Singleton = 1;
12 gui_State = struct('gui_Name', mfilename, ...
13  'gui_Singleton', gui_Singleton, ...
14  'gui_OpeningFcn', @uip_pre_sub_refmean_OpeningFcn, ...
15  'gui_OutputFcn', @uip_pre_sub_refmean_OutputFcn, ...
16  'gui_LayoutFcn', [] , ...
17  'gui_Callback', []);
18 if nargin && ischar(varargin{1})
19  gui_State.gui_Callback = str2func(varargin{1});
20 end
21 
22 if nargout
23  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
24 else
25  gui_mainfcn(gui_State, varargin{:});
26 end
27 % End initialization code - DO NOT EDIT
28 
29 
30 % --- Executes just before uip_pre_sub_refmean is made visible.
31 function uip_pre_sub_refmean_OpeningFcn(hObject, eventdata, handles, varargin)
32 handles.output.flag_ok = 0;
33 guidata(hObject, handles);
34 gui_set_position(hObject);
35 
36 % --- Outputs from this function are returned to the command clae.
37 function varargout = uip_pre_sub_refmean_OutputFcn(hObject, eventdata, handles)
38 try
39  uiwait(handles.figure1);
40  handles = guidata(hObject);
41  varargout{1} = handles.output;
42  delete(gcf);
43 catch
44  output.flag_ok = 0;
45  output.params = {};
46  varargout{1} = output;
47 end;
48 
49 % --- Executes on button press in pushbuttonOK.
50 function pushbuttonOK_Callback(hObject, eventdata, handles)
51 try
52  refclass = eval(get(handles.edit_idx_refclass, 'String'));
53  if refclass < 1
54  irerror('Index of reference class needs to be >= 1!');
55  end;
56 
57  handles.output.params = {...
58  'idx_refclass', int2str(refclass) ...
59  };
60  handles.output.flag_ok = 1;
61  guidata(hObject, handles);
62  uiresume();
63 catch ME
64  irerrordlg(ME.message, 'Cannot continue');
65 
66 end;
67 
68 
69 function edit_idx_refclass_Callback(hObject, eventdata, handles)
70 
71 
72 % --- Executes during object creation, after setting all properties.
73 function edit_idx_refclass_CreateFcn(hObject, eventdata, handles)
74 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
75  set(hObject,'BackgroundColor','white');
76 end
77 
78 
79 % --- Executes on selection change in popupmenu_data_input.
80 function popupmenu_data_input_Callback(hObject, eventdata, handles)
81 
82 
83 % --- Executes during object creation, after setting all properties.
84 function popupmenu_data_input_CreateFcn(hObject, eventdata, handles)
85 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
86  set(hObject,'BackgroundColor','white');
87 end
88 %> @endcond
function irerror(in s)
function gui_set_position(in hObject)
Subtracts the mean of a reference class from all the rows.
function irerrordlg(in errorstring, in dlgname)