IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_fcon_pca.m
Go to the documentation of this file.
1 %>@file
2 %>@ingroup guigroup
3 %>@brief Properties Window for @ref fcon_pca
4 %>
5 %>@image html Screenshot-uip_fcon_pca.png
6 %>
7 %> <b>Number of PCA factors</b> - see fcon_pca::no_factors
8 %>
9 %> <b>Rotate factors</b> - see fcon_pca::flag_rotate_factors
10 %>
11 %> @sa fcon_pca
12 
13 %>@cond
14 function varargout = uip_fcon_pca(varargin)
15 % Begin initialization code - DO NOT EDIT
16 gui_Singleton = 1;
17 gui_State = struct('gui_Name', mfilename, ...
18  'gui_Singleton', gui_Singleton, ...
19  'gui_OpeningFcn', @uip_fcon_pca_OpeningFcn, ...
20  'gui_OutputFcn', @uip_fcon_pca_OutputFcn, ...
21  'gui_LayoutFcn', [] , ...
22  'gui_Callback', []);
23 if nargin && ischar(varargin{1})
24  gui_State.gui_Callback = str2func(varargin{1});
25 end
26 
27 if nargout
28  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
29 else
30  gui_mainfcn(gui_State, varargin{:});
31 end
32 % End initialization code - DO NOT EDIT
33 
34 
35 % --- Executes just before uip_fcon_pca is made visible.
36 function uip_fcon_pca_OpeningFcn(hObject, eventdata, handles, varargin)
37 handles.output.flag_ok = 0;
38 guidata(hObject, handles);
39 gui_set_position(hObject);
40 
41 
42 % --- Outputs from this function are returned to the command clae.
43 function varargout = uip_fcon_pca_OutputFcn(hObject, eventdata, handles)
44 try
45  uiwait(handles.figure1);
46  handles = guidata(hObject);
47  varargout{1} = handles.output;
48  delete(gcf);
49 catch
50  output.flag_ok = 0;
51  varargout{1} = output;
52 end;
53 
54 
55 
56 function editReg_Callback(hObject, eventdata, handles)
57 % hObject handle to editReg (see GCBO)
58 % eventdata reserved - to be defined in a future version of MATLAB
59 % handles structure with handles and user data (see GUIDATA)
60 
61 % Hints: get(hObject,'String') returns contents of editReg as text
62 % str2double(get(hObject,'String')) returns contents of editReg as a double
63 
64 
65 % --- Executes during object creation, after setting all properties.
66 function editReg_CreateFcn(hObject, eventdata, handles)
67 % hObject handle to editReg (see GCBO)
68 % eventdata reserved - to be defined in a future version of MATLAB
69 % handles empty - handles not created until after all CreateFcns called
70 
71 % Hint: edit controls usually have a white background on Windows.
72 % See ISPC and COMPUTER.
73 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
74  set(hObject,'BackgroundColor','white');
75 end
76 
77 
78 
79 % --- Executes on button press in pushbuttonOk.
80 function pushbuttonOk_Callback(hObject, eventdata, handles)
81 % hObject handle to pushbuttonOk (see GCBO)
82 % eventdata reserved - to be defined in a future version of MATLAB
83 % handles structure with handles and user data (see GUIDATA)
84 
85 handles.output.params = {...
86 'no_factors', int2str(eval(get(handles.editNofactors, 'String'))), ...
87 'flag_rotate_factors', int2str(get(handles.checkboxFlagRotate, 'Value')) ...
88 };
89 handles.output.flag_ok = 1;
90 guidata(hObject, handles);
91 uiresume();
92 
93 
94 % --- Executes on selection change in popupmenuType.
95 function popupmenuType_Callback(hObject, eventdata, handles)
96 % hObject handle to popupmenuType (see GCBO)
97 % eventdata reserved - to be defined in a future version of MATLAB
98 % handles structure with handles and user data (see GUIDATA)
99 
100 % Hints: contents = get(hObject,'String') returns popupmenuType contents as cell array
101 % contents{get(hObject,'Value')} returns selected item from popupmenuType
102 
103 
104 % --- Executes during object creation, after setting all properties.
105 function popupmenuType_CreateFcn(hObject, eventdata, handles)
106 % hObject handle to popupmenuType (see GCBO)
107 % eventdata reserved - to be defined in a future version of MATLAB
108 % handles empty - handles not created until after all CreateFcns called
109 
110 % Hint: popupmenu controls usually have a white background on Windows.
111 % See ISPC and COMPUTER.
112 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
113  set(hObject,'BackgroundColor','white');
114 end
115 
116 
117 function editNofactors_Callback(hObject, eventdata, handles)
118 % hObject handle to editNofactors (see GCBO)
119 % eventdata reserved - to be defined in a future version of MATLAB
120 % handles structure with handles and user data (see GUIDATA)
121 
122 % Hints: get(hObject,'String') returns contents of editNofactors as text
123 % str2double(get(hObject,'String')) returns contents of editNofactors as a double
124 
125 
126 % --- Executes during object creation, after setting all properties.
127 function editNofactors_CreateFcn(hObject, eventdata, handles)
128 % hObject handle to editNofactors (see GCBO)
129 % eventdata reserved - to be defined in a future version of MATLAB
130 % handles empty - handles not created until after all CreateFcns called
131 
132 % Hint: edit controls usually have a white background on Windows.
133 % See ISPC and COMPUTER.
134 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
135  set(hObject,'BackgroundColor','white');
136 end
137 
138 
139 % --- Executes on button press in checkboxFlagRotate.
140 function checkboxFlagRotate_Callback(hObject, eventdata, handles)
141 %>@endcond
Principal Component Analysis.
Definition: fcon_pca.m:4
Property flag_rotate_factors
= 1: whether to rotate factors or not.
Definition: fcon_pca.m:10
Property no_factors
= 10: number of factors to feature in the transformed dataset.
Definition: fcon_pca.m:13
function gui_set_position(in hObject)
Analysis Session (AS) base class.
Definition: as.m:6