IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_clus_hca.m
Go to the documentation of this file.
1 %>@file
2 %>@ingroup guigroup
3 %>@brief Properties Window for @ref clus_hca
4 %>
5 %>@image html Screenshot-uip_clus_hca.png
6 %>
7 %> <b>Minimum number of clusters</b> - see clus_hca::nc_min
8 %>
9 %> <b>Maximum number of clusters</b> - see clus_hca::nc_max
10 %>
11 %> <b>Distance type</b> - see clus_hca::distancetype
12 %>
13 %> <b>Linkage type</b> - see clus_hca::linkagetype
14 %>
15 %>@sa clus_hca
16 
17 %>@cond
18 function varargout = uip_clus_hca(varargin)
19 % Last Modified by GUIDE v2.5 23-Jun-2011 04:09:31
20 
21 % Begin initialization code - DO NOT EDIT
22 gui_Singleton = 1;
23 gui_State = struct('gui_Name', mfilename, ...
24  'gui_Singleton', gui_Singleton, ...
25  'gui_OpeningFcn', @uip_clus_hca_OpeningFcn, ...
26  'gui_OutputFcn', @uip_clus_hca_OutputFcn, ...
27  'gui_LayoutFcn', [] , ...
28  'gui_Callback', []);
29 if nargin && ischar(varargin{1})
30  gui_State.gui_Callback = str2func(varargin{1});
31 end
32 
33 if nargout
34  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
35 else
36  gui_mainfcn(gui_State, varargin{:});
37 end
38 % End initialization code - DO NOT EDIT
39 
40 
41 % --- Executes just before uip_clus_hca is made visible.
42 function uip_clus_hca_OpeningFcn(hObject, eventdata, handles, varargin)
43 handles.output.flag_ok = 0;
44 guidata(hObject, handles);
45 gui_set_position(hObject);
46 
47 
48 % --- Outputs from this function are returned to the command clae.
49 function varargout = uip_clus_hca_OutputFcn(hObject, eventdata, handles)
50 try
51  uiwait(handles.figure1);
52  handles = guidata(hObject);
53  varargout{1} = handles.output;
54  delete(gcf);
55 catch
56  output.flag_ok = 0;
57  varargout{1} = output;
58 end;
59 
60 
61 % --- Executes on button press in pushbuttonOk.
62 function pushbuttonOk_Callback(hObject, eventdata, handles)
63 
64 v1 = get(handles.popupmenu_distancetype, 'String');
65 s1 = v1{get(handles.popupmenu_distancetype, 'Value')};
66 v2 = get(handles.popupmenu_linkagetype, 'String');
67 s2 = v2{get(handles.popupmenu_linkagetype, 'Value')};
68 
69 handles.output.params = {...
70 'nc_min', int2str(eval(get(handles.edit_nc_min, 'String'))), ...
71 'nc_max', int2str(eval(get(handles.edit_nc_max, 'String'))), ...
72 'distancetype', ['''', s1, ''''], ...
73 'linkagetype', ['''', s2, ''''], ...
74 };
75 handles.output.flag_ok = 1;
76 guidata(hObject, handles);
77 uiresume();
78 
79 
80 function edit_nc_min_Callback(hObject, eventdata, handles)
81 
82 % --- Executes during object creation, after setting all properties.
83 function edit_nc_min_CreateFcn(hObject, eventdata, handles)
84 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
85  set(hObject,'BackgroundColor','white');
86 end
87 
88 
89 
90 function edit_nc_max_Callback(hObject, eventdata, handles)
91 
92 
93 % --- Executes during object creation, after setting all properties.
94 function edit_nc_max_CreateFcn(hObject, eventdata, handles)
95 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
96  set(hObject,'BackgroundColor','white');
97 end
98 
99 
100 % --- Executes on selection change in popupmenu_distancetype.
101 function popupmenu_distancetype_Callback(hObject, eventdata, handles)
102 
103 % --- Executes during object creation, after setting all properties.
104 function popupmenu_distancetype_CreateFcn(hObject, eventdata, handles)
105 % hObject handle to popupmenu_distancetype (see GCBO)
106 % eventdata reserved - to be defined in a future version of MATLAB
107 % handles empty - handles not created until after all CreateFcns called
108 
109 % Hint: popupmenu controls usually have a white background on Windows.
110 % See ISPC and COMPUTER.
111 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
112  set(hObject,'BackgroundColor','white');
113 end
114 
115 
116 % --- Executes on selection change in popupmenu_linkagetype.
117 function popupmenu_linkagetype_Callback(hObject, eventdata, handles)
118 
119 
120 % --- Executes during object creation, after setting all properties.
121 function popupmenu_linkagetype_CreateFcn(hObject, eventdata, handles)
122 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
123  set(hObject,'BackgroundColor','white');
124 end
125 %>@endcond
Hierarchical Clustering.
Definition: clus_hca.m:8
Property distancetype
='euclidean'. Distance type. See help for pdist() for possible types.
Definition: clus_hca.m:20
function gui_set_position(in hObject)
Property linkagetype
='ward'. Linkage type. Default is set to the famous "Ward". See help for linkage() for possible types...
Definition: clus_hca.m:23
Property nc_max
Maximum number of clusters.
Definition: clus_hca.m:17
Property nc_min
Minimum number of clusters.
Definition: clus_hca.m:14