comparison toolboxes/MIRtoolbox1.3.2/somtoolbox/sompak_train_gui.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function sompak_train_gui()
2
3 %SOMPAK_TRAIN_GUI A GUI for using SOM_PAK training program from Matlab.
4 %
5 % sompak_train_gui
6 %
7 % Launches a GUI which allows the use of SOM_PAK training program
8 % (vsom) from Matlab. Notice that to use this function, the SOM_PAK
9 % programs must be in your search path, or the variable 'SOM_PAKDIR'
10 % which is a string containing the program path, must be defined in
11 % the workspace. SOM_PAK programs can be found from:
12 % http://www.cis.hut.fi/research/som_lvq_pak.shtml
13 %
14 % See also SOMPAK_TRAIN, SOMPAK_GUI, SOMPAK_INIT_GUI,
15 % SOMPAK_SAMMON_GUI, SOM_GUI.
16
17 % Contributed to SOM Toolbox vs2, February 2nd, 2000 by Juha Parhankangas
18 % Copyright (c) by Juha Parhankangas
19 % http://www.cis.hut.fi/projects/somtoolbox/
20
21 % Juha Parhankangas 050100
22
23 h=findobj(get(0,'Children'),'Tag','TrainGUI');
24
25 if ~isempty(h)
26 figure(h);
27 return;
28 end
29
30 a = figure('Color',[0.8 0.8 0.8],...
31 'PaperType','a4letter', ...
32 'Position',[558 207 173 445], ...
33 'Tag','TrainGUI');
34 b = uicontrol('Parent',a, ...
35 'Units','points', ...
36 'BackgroundColor',[0.701961 0.701961 0.701961], ...
37 'Callback','close gcf', ...
38 'FontWeight','demi', ...
39 'Position',[8 20 50 20], ...
40 'String','CLOSE', ...
41 'Tag','Pushbutton1');
42 b = uicontrol('Parent',a, ...
43 'Units','points', ...
44 'BackgroundColor',[0.701961 0.701961 0.701961], ...
45 'Callback','sompak_rb_control train_ok',...
46 'FontWeight','demi', ...
47 'Position',[86 20 50 20], ...
48 'String','OK', ...
49 'Tag','Pushbutton2');
50 b = uicontrol('Parent',a, ...
51 'Units','points', ...
52 'BackgroundColor',[0.701961 0.701961 0.701961], ...
53 'Position',[8 50 130 300], ...
54 'Style','frame', ...
55 'Tag','Frame1');
56 b = uicontrol('Parent',a, ...
57 'Units','points', ...
58 'BackgroundColor',[0.8 0.8 0.8], ...
59 'Position',[12 54 122 40], ...
60 'Style','frame', ...
61 'Tag','Frame2');
62 b = uicontrol('Parent',a, ...
63 'Units','points', ...
64 'BackgroundColor',[0.8 0.8 0.8], ...
65 'FontWeight','demi', ...
66 'HorizontalAlignment','left', ...
67 'Position',[18 78 110 12], ...
68 'String','NEIGHBORHOOD RADIUS', ...
69 'Style','text', ...
70 'Tag','StaticText1');
71 b = uicontrol('Parent',a, ...
72 'Units','points', ...
73 'BackgroundColor',[1 1 1], ...
74 'Callback','sompak_rb_control radius', ...
75 'Position',[48 56 50 20], ...
76 'Style','edit', ...
77 'Tag','RADIUS');
78
79 udata.radius=[];
80
81 b = uicontrol('Parent',a, ...
82 'Units','points', ...
83 'BackgroundColor',[0.8 0.8 0.8], ...
84 'Position',[12 96 122 40], ...
85 'Style','frame', ...
86 'Tag','Frame3');
87 b = uicontrol('Parent',a, ...
88 'Units','points', ...
89 'BackgroundColor',[0.8 0.8 0.8], ...
90 'FontWeight','demi', ...
91 'HorizontalAlignment','left', ...
92 'Position',[22 120 101 12], ...
93 'String','INITIAL ALPHA VALUE', ...
94 'Style','text', ...
95 'Tag','StaticText2');
96 b = uicontrol('Parent',a, ...
97 'Units','points', ...
98 'BackgroundColor',[1 1 1], ...
99 'Callback','sompak_rb_control alpha',...
100 'Position',[48 99 50 20], ...
101 'Style','edit', ...
102 'Tag','ALPHA');
103
104
105 udata.alpha=[];
106
107
108 b = uicontrol('Parent',a, ...
109 'Units','points', ...
110 'BackgroundColor',[0.8 0.8 0.8], ...
111 'Position',[12 138 122 40], ...
112 'Style','frame', ...
113 'Tag','Frame4');
114 b = uicontrol('Parent',a, ...
115 'Units','points', ...
116 'BackgroundColor',[0.8 0.8 0.8], ...
117 'FontWeight','demi', ...
118 'HorizontalAlignment','left', ...
119 'Position',[30 163 90 12], ...
120 'String','RUNNING LENGTH', ...
121 'Style','text', ...
122 'Tag','StaticText3');
123 b = uicontrol('Parent',a, ...
124 'Units','points', ...
125 'BackgroundColor',[1 1 1], ...
126 'Callback','sompak_rb_control rlen',...
127 'Position',[48 141 50 20], ...
128 'Style','edit', ...
129 'Tag','RLEN');
130
131 udata.rlen=[];
132
133 b = uicontrol('Parent',a, ...
134 'Units','points', ...
135 'BackgroundColor',[0.8 0.8 0.8], ...
136 'Position',[12 180 122 40], ...
137 'Style','frame', ...
138 'Tag','Frame5');
139 b = uicontrol('Parent',a, ...
140 'Units','points', ...
141 'BackgroundColor',[0.8 0.8 0.8], ...
142 'FontWeight','demi', ...
143 'HorizontalAlignment','left', ...
144 'Position',[30 204 90 11], ...
145 'String','OUTPUT VARIABLE', ...
146 'Style','text', ...
147 'Tag','StaticText4');
148 b = uicontrol('Parent',a, ...
149 'Units','points', ...
150 'BackgroundColor',[1 1 1], ...
151 'Callback','sompak_rb_control out_var',...
152 'Position',[48 183 50 20], ...
153 'String','''ans''',...
154 'Style','edit', ...
155 'Tag','OUT_VAR');
156
157 udata.out_var='ans';
158
159 b = uicontrol('Parent',a, ...
160 'Units','points', ...
161 'BackgroundColor',[0.8 0.8 0.8], ...
162 'Position',[12 222 122 40], ...
163 'Style','frame', ...
164 'Tag','Frame6');
165 b = uicontrol('Parent',a, ...
166 'Units','points', ...
167 'BackgroundColor',[0.8 0.8 0.8], ...
168 'FontWeight','demi', ...
169 'HorizontalAlignment','left', ...
170 'Position',[42 245 65 12], ...
171 'String','OUTPUT FILE', ...
172 'Style','text', ...
173 'Tag','StaticText5');
174 b = uicontrol('Parent',a, ...
175 'Units','points', ...
176 'BackgroundColor',[1 1 1], ...
177 'Callback','sompak_rb_control out_file',...
178 'Position',[15 225 50 20], ...
179 'Style','edit', ...
180 'Tag','OUT_FILE');
181
182 udata.out_file=[];
183
184 b = uicontrol('Parent',a, ...
185 'Callback','sompak_rb_control out_ft',...
186 'Units','points', ...
187 'FontWeight','demi', ...
188 'HorizontalAlignment','left', ...
189 'Max',3, ...
190 'Min',1, ...
191 'Position',[70 230 62 15], ...
192 'String',{'No File';'mat-file';'cod-file'}, ...
193 'Style','popupmenu', ...
194 'Tag','OUT_FILE_TYPE', ...
195 'Value',1);
196
197 udata.out_file_type='';
198
199 b = uicontrol('Parent',a, ...
200 'Units','points', ...
201 'BackgroundColor',[0.8 0.8 0.8], ...
202 'Position',[12 264 122 40], ...
203 'Style','frame', ...
204 'Tag','Frame7');
205 b = uicontrol('Parent',a, ...
206 'Units','points', ...
207 'BackgroundColor',[0.8 0.8 0.8], ...
208 'FontWeight','demi', ...
209 'HorizontalAlignment','left', ...
210 'Position',[34 288 85 12], ...
211 'String','TEACHING DATA', ...
212 'Style','text', ...
213 'Tag','StaticText6');
214 b = uicontrol('Parent',a, ...
215 'Units','points', ...
216 'BackgroundColor',[1 1 1], ...
217 'Callback','sompak_rb_control data',...
218 'Position',[15 267 50 20], ...
219 'Style','edit', ...
220 'Tag','DATA');
221 b = uicontrol('Parent',a, ...
222 'Units','points', ...
223 'BackgroundColor',[0.701961 0.701961 0.701961], ...
224 'Callback','sompak_rb_control input_ft',...
225 'FontWeight','demi', ...
226 'HorizontalAlignment','left', ...
227 'Max',3, ...
228 'Min',1, ...
229 'Position',[70 272 62 15], ...
230 'String',{'Variable';'mat-file';'dat-file'}, ...
231 'Style','popupmenu', ...
232 'Tag','INPUT_FILE_TYPE', ...
233 'Value',1);
234
235 udata.input_file_type='';
236
237 b = uicontrol('Parent',a, ...
238 'Units','points', ...
239 'BackgroundColor',[0.8 0.8 0.8], ...
240 'Position',[12 306 122 40], ...
241 'Style','frame', ...
242 'Tag','Frame8');
243 b = uicontrol('Parent',a, ...
244 'Units','points', ...
245 'BackgroundColor',[0.8 0.8 0.8], ...
246 'FontWeight','demi', ...
247 'HorizontalAlignment','left', ...
248 'Position',[60 331 25 12], ...
249 'String','MAP', ...
250 'Style','text', ...
251 'Tag','StaticText7');
252 b = uicontrol('Parent',a, ...
253 'Units','points', ...
254 'BackgroundColor',[1 1 1], ...
255 'Callback','sompak_rb_control map',...
256 'Position',[15 309 50 20], ...
257 'Style','edit', ...
258 'Tag','MAP');
259
260 udata.map=[];
261
262 b = uicontrol('Parent',a, ...
263 'Units','points', ...
264 'BackgroundColor',[0.701961 0.701961 0.701961], ...
265 'Callback','sompak_rb_control map_ft',...
266 'FontWeight','demi', ...
267 'HorizontalAlignment','left', ...
268 'Max',3, ...
269 'Min',1, ...
270 'Position',[70 314 62 15], ...
271 'String',{'Variable','mat-file','cod-file'}, ...
272 'Style','popupmenu', ...
273 'Tag','MAP_TYPE', ...
274 'Value',1);
275
276 udata.map_type='';
277
278 b = uicontrol('Parent',a, ...
279 'Units','points', ...
280 'BackgroundColor',[0.8 0.8 0.8], ...
281 'FontSize',12, ...
282 'FontWeight','demi', ...
283 'HorizontalAlignment','left', ...
284 'Position',[50 359 48 12], ...
285 'String','TRAIN', ...
286 'Style','text', ...
287 'Tag','StaticText8');
288
289 set(gcf,'UserData',udata);
290