wolffd@0
|
1 function som_gui(varargin)
|
wolffd@0
|
2
|
wolffd@0
|
3 %SOM_GUI A GUI for initialization and training of SOM.
|
wolffd@0
|
4 %
|
wolffd@0
|
5 % som_gui([sD])
|
wolffd@0
|
6 %
|
wolffd@0
|
7 % som_gui
|
wolffd@0
|
8 % som_gui(sD)
|
wolffd@0
|
9 %
|
wolffd@0
|
10 % Input and output arguments ([]'s are optional)
|
wolffd@0
|
11 % [sD] (struct) SOM data struct
|
wolffd@0
|
12 % (matrix) a data matrix, size dlen x dim
|
wolffd@0
|
13 %
|
wolffd@0
|
14 % Actually, there are more arguments the function takes, but
|
wolffd@0
|
15 % they are for internal action of the function only. DO NOT use
|
wolffd@0
|
16 % them.
|
wolffd@0
|
17 %
|
wolffd@0
|
18 % For a more throughout description, see the online documentation.
|
wolffd@0
|
19 % See also PREPROCESS.
|
wolffd@0
|
20
|
wolffd@0
|
21 %%%%%%%%%%%% DETAILED DESCRIPTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
22 %
|
wolffd@0
|
23 % IN FILES: som_gui.html,browsewin.jpg,wspace.jpg,loadgui.jpg,initgui.jpg,questdlg.jpg,paragui.jpg,mwindow.jpg,visgui.gif,reload.gif,savemap.gif,browse.gif
|
wolffd@0
|
24 %
|
wolffd@0
|
25
|
wolffd@0
|
26 % Contributed to SOM Toolbox vs2, February 2nd, 2000 by Mika Pollari
|
wolffd@0
|
27 % Copyright (c) by Mika Pollari and SOM Toolbox Team
|
wolffd@0
|
28 % http://www.cis.hut.fi/projects/somtoolbox/
|
wolffd@0
|
29
|
wolffd@0
|
30 % Mika Pollari 31.1.2000 vs 1.1
|
wolffd@0
|
31
|
wolffd@0
|
32 global NEWMAP NEWST MAPSAVED MAP DATA LOAD_NAME LOAD_DATA;
|
wolffd@0
|
33 global SAVEMAP ALGORITHM HANDLE2 STOPOLINIT INIT_TYPE;
|
wolffd@0
|
34 global STRAIN1 STRAIN2 SOTHERS;
|
wolffd@0
|
35
|
wolffd@0
|
36 if nargin == 0
|
wolffd@0
|
37 main_gui;
|
wolffd@0
|
38 action = 'dummy';
|
wolffd@0
|
39 elseif nargin == 1
|
wolffd@0
|
40 temp = varargin{1};
|
wolffd@0
|
41 if isstruct(temp),
|
wolffd@0
|
42 DATA = temp;
|
wolffd@0
|
43 main_gui;
|
wolffd@0
|
44 action = 'input_data';
|
wolffd@0
|
45 elseif isnumeric(temp),
|
wolffd@0
|
46 DATA = som_data_struct(temp);
|
wolffd@0
|
47 main_gui;
|
wolffd@0
|
48 action = 'input_data';
|
wolffd@0
|
49 else
|
wolffd@0
|
50 action = temp;
|
wolffd@0
|
51 end
|
wolffd@0
|
52 end
|
wolffd@0
|
53
|
wolffd@0
|
54
|
wolffd@0
|
55 switch(action)
|
wolffd@0
|
56
|
wolffd@0
|
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LOAD %%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
58 case 'load_data'
|
wolffd@0
|
59 loadgui3; %%% Activates load GUI
|
wolffd@0
|
60 case 'workspace'
|
wolffd@0
|
61 workspace; %%% Workspace selected
|
wolffd@0
|
62 case 'file'
|
wolffd@0
|
63 file; %%% File Selected
|
wolffd@0
|
64 case 'file_select'
|
wolffd@0
|
65 file_select;
|
wolffd@0
|
66 case 'missing'
|
wolffd@0
|
67 Handle = findobj(gcf,'Tag','Checkbox1');
|
wolffd@0
|
68 set(Handle,'Value',1);
|
wolffd@0
|
69 case 'load_ok' %%% <Load OK> pushed
|
wolffd@0
|
70 load_ok;
|
wolffd@0
|
71 case 'input_data' %%% GUI activated with data as arg1
|
wolffd@0
|
72 input_data; %%% eg. som_gui(data)
|
wolffd@0
|
73
|
wolffd@0
|
74 case 'browse' %%% Activates Browse GUI
|
wolffd@0
|
75 browse; %%% Browse files or workspace variables
|
wolffd@0
|
76
|
wolffd@0
|
77 case 'works_ok' %%% <OK> pushed in (workspace) browse GUI
|
wolffd@0
|
78 works_ok;
|
wolffd@0
|
79
|
wolffd@0
|
80 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
81
|
wolffd@0
|
82
|
wolffd@0
|
83 %%%%%%%%%%%%%%%%%%%%%%%% Initialization %%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
84
|
wolffd@0
|
85 case 'def_initialization' %%% Finds default initialization ...
|
wolffd@0
|
86 def_initialization; %%% parameters
|
wolffd@0
|
87
|
wolffd@0
|
88 case 'change_initialization' %%% Activates change (init) parameters GUI
|
wolffd@0
|
89 change_initialization;
|
wolffd@0
|
90
|
wolffd@0
|
91 case 'change_initialization_ok'%%% Set new init. parameters
|
wolffd@0
|
92 change_initialization_ok;
|
wolffd@0
|
93
|
wolffd@0
|
94 case 'change_initialization_cancel'
|
wolffd@0
|
95 close(gcf);
|
wolffd@0
|
96 return;
|
wolffd@0
|
97
|
wolffd@0
|
98 case 'map_size' %%% Checks that 'map_size' is given in correct form
|
wolffd@0
|
99 map_size;
|
wolffd@0
|
100
|
wolffd@0
|
101 case 'munits' %%% Checks that 'munits' is given in correct form
|
wolffd@0
|
102 munits;
|
wolffd@0
|
103
|
wolffd@0
|
104 case 'init' %%% Initialize Map
|
wolffd@0
|
105 init;
|
wolffd@0
|
106
|
wolffd@0
|
107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
108
|
wolffd@0
|
109 %%%%%%%%%%%%%%%%%%%%%%%%% Train %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
110
|
wolffd@0
|
111
|
wolffd@0
|
112 case 'def_values_others'
|
wolffd@0
|
113 def_values_others;
|
wolffd@0
|
114
|
wolffd@0
|
115 case 'def_values_train'
|
wolffd@0
|
116 STRAIN1 = som_train_struct('algorithm',ALGORITHM,'phase','rough','data',DATA);
|
wolffd@0
|
117 STRAIN2 = som_train_struct('previous',STRAIN1);
|
wolffd@0
|
118
|
wolffd@0
|
119 case 'fill_fields' %%% Fill text fields in GUI
|
wolffd@0
|
120 fill_fields;
|
wolffd@0
|
121
|
wolffd@0
|
122 case 'def_train' %%% Train Map
|
wolffd@0
|
123 def_train;
|
wolffd@0
|
124
|
wolffd@0
|
125 case 'change_def' %%% Change default training parameters
|
wolffd@0
|
126 change_def; %%% Activate GUI
|
wolffd@0
|
127
|
wolffd@0
|
128 case 'fill_new_defaults'
|
wolffd@0
|
129 fill_new_defaults;
|
wolffd@0
|
130
|
wolffd@0
|
131 case 'set_batch_mask'
|
wolffd@0
|
132 set_batch_mask;
|
wolffd@0
|
133
|
wolffd@0
|
134 case 'set_new_parameters'
|
wolffd@0
|
135 set_new_parameters;
|
wolffd@0
|
136
|
wolffd@0
|
137 case 'only_finetune' %%% Train only once with finetune parameters
|
wolffd@0
|
138 only_finetune;
|
wolffd@0
|
139
|
wolffd@0
|
140 %%%%%%% Next function check correctnes of new training parameters.
|
wolffd@0
|
141
|
wolffd@0
|
142 case 'check_rough_radini'
|
wolffd@0
|
143 check_rough_radini;
|
wolffd@0
|
144 case 'check_fine_radini'
|
wolffd@0
|
145 check_fine_radini;
|
wolffd@0
|
146 case 'check_rough_radfin'
|
wolffd@0
|
147 check_rough_radfin;
|
wolffd@0
|
148 case 'check_fine_radfin'
|
wolffd@0
|
149 check_fine_radfin;
|
wolffd@0
|
150 case 'check_rough_alphaini'
|
wolffd@0
|
151 check_rough_alphaini;
|
wolffd@0
|
152 case 'check_fine_alphaini'
|
wolffd@0
|
153 check_fine_alphaini;
|
wolffd@0
|
154 case 'check_rough_trainlen'
|
wolffd@0
|
155 check_rough_trainlen;
|
wolffd@0
|
156 case 'check_fine_trainlen'
|
wolffd@0
|
157 check_fine_trainlen;
|
wolffd@0
|
158
|
wolffd@0
|
159
|
wolffd@0
|
160
|
wolffd@0
|
161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
162
|
wolffd@0
|
163 %%%%%%%%%%%%%%%%%%%%%%%%% Save Map %%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
164
|
wolffd@0
|
165 case 'savemap' %%% Save as <.cod> file
|
wolffd@0
|
166 savemap;
|
wolffd@0
|
167 case 'save_workspace' %%% Save in workspace
|
wolffd@0
|
168 save_workspace;
|
wolffd@0
|
169
|
wolffd@0
|
170 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
171
|
wolffd@0
|
172
|
wolffd@0
|
173 %%%%%%%%%%%%%%%%%%%%%%% Help & Info %%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
174 case 'help'
|
wolffd@0
|
175 web file:///share/somtoolbox/vs2/html/som_GUI.html;
|
wolffd@0
|
176 case 'helpwin'
|
wolffd@0
|
177 helpwin1;
|
wolffd@0
|
178 case 'helpwin2'
|
wolffd@0
|
179 helpwin som_gui;
|
wolffd@0
|
180 case 'data_info'
|
wolffd@0
|
181 data_info; %%% Info about data
|
wolffd@0
|
182 case 'map_info' %%% Info about map
|
wolffd@0
|
183 map_info;
|
wolffd@0
|
184 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
185
|
wolffd@0
|
186 %%%%%%%%%%%%%%%%%%% Other Functions %%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
187
|
wolffd@0
|
188 case 'preprocess'
|
wolffd@0
|
189 preprocess_gui; %%%%% Call preprocess GUI
|
wolffd@0
|
190 case 'visualize'
|
wolffd@0
|
191 visualize; %%%%% Call visualization GUI
|
wolffd@0
|
192
|
wolffd@0
|
193 case 'clear_all' %%%%% Clear all filds
|
wolffd@0
|
194 clear_all;
|
wolffd@0
|
195
|
wolffd@0
|
196 case 'close'
|
wolffd@0
|
197 close_fig; %%%%% Close active GUI
|
wolffd@0
|
198
|
wolffd@0
|
199 end
|
wolffd@0
|
200
|
wolffd@0
|
201 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
202 %%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
203 %%%%%%%%%%%% END OF SWITCH-STATEMENT %%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
204 %%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
206
|
wolffd@0
|
207
|
wolffd@0
|
208
|
wolffd@0
|
209
|
wolffd@0
|
210
|
wolffd@0
|
211
|
wolffd@0
|
212
|
wolffd@0
|
213
|
wolffd@0
|
214
|
wolffd@0
|
215
|
wolffd@0
|
216
|
wolffd@0
|
217
|
wolffd@0
|
218
|
wolffd@0
|
219
|
wolffd@0
|
220
|
wolffd@0
|
221 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
222 %%%%%%%%% (SUB) FUNCTIONS
|
wolffd@0
|
223
|
wolffd@0
|
224
|
wolffd@0
|
225
|
wolffd@0
|
226
|
wolffd@0
|
227 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
228 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
229 %%%%%%%%%%%%%%%%% LOAD SECTION STARTS %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
230 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
231 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
232
|
wolffd@0
|
233 function [] = workspace()
|
wolffd@0
|
234 Handle = findobj(gcbf,'Tag','Radiobutton2');
|
wolffd@0
|
235 Value = get(Handle,'Value');
|
wolffd@0
|
236 HandleTemp = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
237 if Value == 1
|
wolffd@0
|
238 set(HandleTemp,'Value',0);
|
wolffd@0
|
239 HandleBar = findobj(gcbf,'Tag','PopupMenu1');
|
wolffd@0
|
240 set(HandleBar,'Enable','off');
|
wolffd@0
|
241 set(HandleBar,'Visible','off');
|
wolffd@0
|
242 Handle3 = findobj(gcbf,'Tag','StaticText3');
|
wolffd@0
|
243 set(Handle3,'Visible','off');
|
wolffd@0
|
244 Handle3 = findobj(gcbf,'Tag','Checkbox1');
|
wolffd@0
|
245 set(Handle3,'Visible','off');
|
wolffd@0
|
246 Handle3 = findobj(gcbf,'Tag','EditText3');
|
wolffd@0
|
247 set(Handle3,'Visible','off');
|
wolffd@0
|
248 Handle = findobj(gcbf,'Tag','EditText2');
|
wolffd@0
|
249 set(Handle,'String','');
|
wolffd@0
|
250 end
|
wolffd@0
|
251
|
wolffd@0
|
252
|
wolffd@0
|
253
|
wolffd@0
|
254 function [] = file()
|
wolffd@0
|
255 Handle = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
256 Value = get(Handle,'Value');
|
wolffd@0
|
257 HandleTemp = findobj(gcbf,'Tag','Radiobutton2');
|
wolffd@0
|
258 if Value == 1
|
wolffd@0
|
259 set(HandleTemp,'Value',0);
|
wolffd@0
|
260 HandleBar = findobj(gcbf,'Tag','PopupMenu1');
|
wolffd@0
|
261 set(HandleBar,'Enable','on');
|
wolffd@0
|
262 set(HandleBar,'Visible','on');
|
wolffd@0
|
263 Handle3 = findobj(gcbf,'Tag','StaticText3');
|
wolffd@0
|
264 set(Handle3,'Visible','on');
|
wolffd@0
|
265 Handle3 = findobj(gcbf,'Tag','Checkbox1');
|
wolffd@0
|
266 set(Handle3,'Visible','on');
|
wolffd@0
|
267 Handle3 = findobj(gcbf,'Tag','EditText3');
|
wolffd@0
|
268 set(Handle3,'Visible','on');
|
wolffd@0
|
269 Handle = findobj(gcbf,'Tag','EditText1');
|
wolffd@0
|
270 set(Handle,'String','');
|
wolffd@0
|
271 end
|
wolffd@0
|
272
|
wolffd@0
|
273 function [] = file_select()
|
wolffd@0
|
274 Handle = findobj(gcbf,'Tag','PopupMenu1');
|
wolffd@0
|
275 temp = get(Handle,'String');
|
wolffd@0
|
276 val = get(Handle,'Value');
|
wolffd@0
|
277 Handle1 = findobj(gcbf,'Tag','Checkbox1');
|
wolffd@0
|
278 Handle2 = findobj(gcbf,'Tag','EditText3');
|
wolffd@0
|
279 if strcmp(temp{val},'dat file')
|
wolffd@0
|
280 set(Handle2,'String','x');
|
wolffd@0
|
281 set(Handle1,'Enable','on');
|
wolffd@0
|
282 set(Handle2,'Enable','on');
|
wolffd@0
|
283 set(Handle1,'Visible','on');
|
wolffd@0
|
284 set(Handle2,'Visible','on');
|
wolffd@0
|
285 else
|
wolffd@0
|
286 set(Handle1,'Value',0);
|
wolffd@0
|
287 set(Handle1,'Enable','off');
|
wolffd@0
|
288 set(Handle2,'Enable','off');
|
wolffd@0
|
289 set(Handle1,'Visible','off');
|
wolffd@0
|
290 set(Handle2,'Visible','off');
|
wolffd@0
|
291 end
|
wolffd@0
|
292
|
wolffd@0
|
293 function [] = load_ok()
|
wolffd@0
|
294 global MAP DATA LOAD_DATA LOAD_NAME;
|
wolffd@0
|
295 Handle1 = findobj(gcbf,'Tag','EditText1');
|
wolffd@0
|
296 Handle2 = findobj(gcbf,'Tag','EditText2');
|
wolffd@0
|
297 Name1 = get(Handle1,'String');
|
wolffd@0
|
298 Name2 = get(Handle2,'String');
|
wolffd@0
|
299 if isempty(Name1) & not(isempty(Name2))
|
wolffd@0
|
300 Handle = findobj(gcbf,'Tag','PopupMenu1')
|
wolffd@0
|
301 type = get(Handle,'String');
|
wolffd@0
|
302 val = get(Handle,'Value');
|
wolffd@0
|
303 type = type{val};
|
wolffd@0
|
304 if strcmp(type,'mat file')
|
wolffd@0
|
305 ltemp = 'load:::';
|
wolffd@0
|
306 ltemp = strcat(ltemp,Name2);
|
wolffd@0
|
307 ltemp = strrep(ltemp,':::',' ');
|
wolffd@0
|
308 evalin('base',ltemp);
|
wolffd@0
|
309 DATA = evalin('base','sD');
|
wolffd@0
|
310 LOAD_DATA = evalin('base','sD.data');
|
wolffd@0
|
311 LOAD_NAME = evalin('base','sD.name');
|
wolffd@0
|
312 LOAD_NAME = strrep(LOAD_NAME,'.','_');
|
wolffd@0
|
313 load_labels = evalin('base','sD.labels');
|
wolffd@0
|
314 load_comp_names = evalin('base','sD.comp_names');
|
wolffd@0
|
315 DATA = som_data_struct(LOAD_DATA);
|
wolffd@0
|
316 DATA.name = LOAD_NAME;
|
wolffd@0
|
317 DATA.comp_names = load_comp_names;
|
wolffd@0
|
318 DATA.labels = load_labels;
|
wolffd@0
|
319 else
|
wolffd@0
|
320 Handle = findobj(gcbf,'Tag','Checkbox1');
|
wolffd@0
|
321 value = get(Handle,'Value');
|
wolffd@0
|
322 if value == 0
|
wolffd@0
|
323 temp = 'som_read_data(''';
|
wolffd@0
|
324 temp = strcat(temp,Name2,''');');
|
wolffd@0
|
325 else
|
wolffd@0
|
326 Handle = findobj(gcbf,'Tag','EditText3');
|
wolffd@0
|
327 missing = get(Handle,'String');
|
wolffd@0
|
328 if not(isempty(missing))
|
wolffd@0
|
329 temp = 'som_read_data(''';
|
wolffd@0
|
330 temp = strcat(temp,Name2,'''',',','''',missing,''');');
|
wolffd@0
|
331 else
|
wolffd@0
|
332 temp = 'som_read_data(''';
|
wolffd@0
|
333 temp = strcat(temp,Name2,''');');
|
wolffd@0
|
334 end
|
wolffd@0
|
335 end
|
wolffd@0
|
336 evalin('base',temp);
|
wolffd@0
|
337 DATA = evalin('base','ans');
|
wolffd@0
|
338 name = DATA.name;
|
wolffd@0
|
339 temp = findstr('/',name);
|
wolffd@0
|
340 if not(isempty(temp))
|
wolffd@0
|
341 name = name(temp(end)+1:end);
|
wolffd@0
|
342 end
|
wolffd@0
|
343 name = strrep(name,'.','_');
|
wolffd@0
|
344 LOAD_NAME = name;
|
wolffd@0
|
345 DATA.name = name;
|
wolffd@0
|
346 end
|
wolffd@0
|
347 elseif isempty(Name2) & not(isempty(Name1))
|
wolffd@0
|
348 LOAD_DATA = evalin('base',Name1);
|
wolffd@0
|
349 if not(isstruct(LOAD_DATA))
|
wolffd@0
|
350 DATA = som_data_struct(LOAD_DATA);
|
wolffd@0
|
351 LOAD_NAME = Name1;
|
wolffd@0
|
352 DATA.name = Name1;
|
wolffd@0
|
353 else
|
wolffd@0
|
354 DATA = LOAD_DATA;
|
wolffd@0
|
355 name = DATA.name;
|
wolffd@0
|
356 temp = findstr('/',name);
|
wolffd@0
|
357 if not(isempty(temp))
|
wolffd@0
|
358 name = name(temp(end)+1:end);
|
wolffd@0
|
359 end
|
wolffd@0
|
360 name = strrep(name,'.','_');
|
wolffd@0
|
361 LOAD_NAME = name;
|
wolffd@0
|
362 DATA.name = name;
|
wolffd@0
|
363 end
|
wolffd@0
|
364 else
|
wolffd@0
|
365 errmsg = {'Give name of data before loading'};
|
wolffd@0
|
366 errordlg(errmsg,'Empty data name!');
|
wolffd@0
|
367 return;
|
wolffd@0
|
368 end
|
wolffd@0
|
369 close(gcbf);
|
wolffd@0
|
370 if not(isempty(MAP))
|
wolffd@0
|
371 clear MAP;
|
wolffd@0
|
372 global MAP;
|
wolffd@0
|
373 str1 = 'Map: <empty>';
|
wolffd@0
|
374 str2 = 'Train';
|
wolffd@0
|
375 Handle = findobj(gcf,'Tag','StaticText3');
|
wolffd@0
|
376 set(Handle,'String',str1);
|
wolffd@0
|
377 Handle = findobj(gcf,'Tag','StaticText8');
|
wolffd@0
|
378 set(Handle,'String',str2);
|
wolffd@0
|
379 end
|
wolffd@0
|
380 temp = 'Data:';
|
wolffd@0
|
381 temp = strcat(temp,' <',LOAD_NAME,'>');
|
wolffd@0
|
382 Handle = findobj(gcf,'Tag','StaticText4');
|
wolffd@0
|
383 set(Handle,'String',temp);
|
wolffd@0
|
384 som_gui('def_initialization');
|
wolffd@0
|
385 Handle = findobj(gcf,'Tag','Pushbutton2');
|
wolffd@0
|
386 set(Handle,'Enable','off');
|
wolffd@0
|
387 Handle = findobj(gcf,'Tag','Pushbutton4');
|
wolffd@0
|
388 set(Handle,'Enable','on');
|
wolffd@0
|
389 Handle = findobj(gcf,'Tag','Pushbutton9');
|
wolffd@0
|
390 set(Handle,'Enable','on');
|
wolffd@0
|
391 Handle = findobj(gcf,'Tag','Subuimenu2');
|
wolffd@0
|
392 set(Handle,'Enable','on');
|
wolffd@0
|
393 Handle = findobj(gcf,'Tag','&Help/InfoHelp windowuimenu1');
|
wolffd@0
|
394 set(Handle,'Enable','on');
|
wolffd@0
|
395 Handle = findobj(gcf,'Tag','&Init&Trainuimenu1');
|
wolffd@0
|
396 set(Handle,'Enable','on');
|
wolffd@0
|
397 Handle = findobj(gcf,'Tag','&Init&TrainInitialize1');
|
wolffd@0
|
398 set(Handle,'Enable','on');
|
wolffd@0
|
399 Handle = findobj(gcf,'Tag','Subuimenu1');
|
wolffd@0
|
400 set(Handle,'Enable','off'); %%%%%%????????
|
wolffd@0
|
401 Handle = findobj(gcf,'Tag','StaticText10');
|
wolffd@0
|
402 set(Handle,'String','Status <data loaded>');
|
wolffd@0
|
403
|
wolffd@0
|
404
|
wolffd@0
|
405
|
wolffd@0
|
406 function [] = input_data()
|
wolffd@0
|
407 global DATA;
|
wolffd@0
|
408 name = DATA.name;
|
wolffd@0
|
409 newname = strrep(name,'.','_');
|
wolffd@0
|
410 DATA.name = newname;
|
wolffd@0
|
411 temp = strcat('Data: <',newname,'>');
|
wolffd@0
|
412 Handle = findobj(gcf,'Tag','StaticText4');
|
wolffd@0
|
413 set(Handle,'String',temp);
|
wolffd@0
|
414 som_gui('def_initialization');
|
wolffd@0
|
415 Handle = findobj(gcf,'Tag','Pushbutton2');
|
wolffd@0
|
416 set(Handle,'Enable','off');
|
wolffd@0
|
417 Handle = findobj(gcf,'Tag','Pushbutton4');
|
wolffd@0
|
418 set(Handle,'Enable','on');
|
wolffd@0
|
419 Handle = findobj(gcf,'Tag','Pushbutton9');
|
wolffd@0
|
420 set(Handle,'Enable','on');
|
wolffd@0
|
421 Handle = findobj(gcf,'Tag','Subuimenu2');
|
wolffd@0
|
422 set(Handle,'Enable','on');
|
wolffd@0
|
423 Handle = findobj(gcf,'Tag','&Help/InfoHelp windowuimenu1');
|
wolffd@0
|
424 set(Handle,'Enable','on');
|
wolffd@0
|
425 Handle = findobj(gcf,'Tag','&Init&Trainuimenu1');
|
wolffd@0
|
426 set(Handle,'Enable','on');
|
wolffd@0
|
427 Handle = findobj(gcf,'Tag','&Init&TrainInitialize1');
|
wolffd@0
|
428 set(Handle,'Enable','on');
|
wolffd@0
|
429 Handle = findobj(gcf,'Tag','Subuimenu1');
|
wolffd@0
|
430 set(Handle,'Enable','off'); %%%%%%????????
|
wolffd@0
|
431 Handle = findobj(gcf,'Tag','StaticText10');
|
wolffd@0
|
432 set(Handle,'String','Status <data loaded>');
|
wolffd@0
|
433
|
wolffd@0
|
434
|
wolffd@0
|
435 function [] = browse()
|
wolffd@0
|
436 global HANDLE2;
|
wolffd@0
|
437 HandleWorkspace = findobj(gcbf,'Tag','Radiobutton2');
|
wolffd@0
|
438 HandleFile = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
439 WorkspaceVal = get(HandleWorkspace,'Value');
|
wolffd@0
|
440 FileVal = get(HandleFile,'Value');
|
wolffd@0
|
441 if FileVal == 1
|
wolffd@0
|
442 Handle = findobj(gcbf,'Tag','PopupMenu1');
|
wolffd@0
|
443 str = get(Handle,'String');
|
wolffd@0
|
444 value = get(Handle,'Value');
|
wolffd@0
|
445 str = str{value};
|
wolffd@0
|
446 if strcmp(str,'mat file')
|
wolffd@0
|
447 filtter = '*.mat';
|
wolffd@0
|
448 else
|
wolffd@0
|
449 filtter = '*.dat*';
|
wolffd@0
|
450 end
|
wolffd@0
|
451 [filename pathname] = uigetfile(filtter,'Load file.');
|
wolffd@0
|
452 temp = strcat(pathname,filename);
|
wolffd@0
|
453 Handle = findobj(gcbf,'Tag','EditText2');
|
wolffd@0
|
454 set(Handle,'String',temp);
|
wolffd@0
|
455 elseif WorkspaceVal == 1
|
wolffd@0
|
456 HANDLE2 = gcf;
|
wolffd@0
|
457 works;
|
wolffd@0
|
458 temp = evalin('base','who');
|
wolffd@0
|
459 index2 = 1;
|
wolffd@0
|
460 names = '';
|
wolffd@0
|
461 for index = 1:length(temp)
|
wolffd@0
|
462 if isnumeric(evalin('base',temp{index}))
|
wolffd@0
|
463 test = size(evalin('base',temp{index}));
|
wolffd@0
|
464 if test(1) ~= 1 & test(2) ~= 1
|
wolffd@0
|
465 names{index2} = temp{index};
|
wolffd@0
|
466 index2 = index2 + 1;
|
wolffd@0
|
467 end
|
wolffd@0
|
468 end
|
wolffd@0
|
469 end
|
wolffd@0
|
470 for index = 1:length(temp)
|
wolffd@0
|
471 variable = evalin('base',temp{index});
|
wolffd@0
|
472 if isstruct(variable)
|
wolffd@0
|
473 fnames = fieldnames(variable);
|
wolffd@0
|
474 if size(fnames,1) == 6 & strcmp(fnames(1),'type') & strcmp(variable.type,'som_data')
|
wolffd@0
|
475 names{index2} = temp{index};
|
wolffd@0
|
476 index2 = index2 + 1;
|
wolffd@0
|
477 end
|
wolffd@0
|
478 end
|
wolffd@0
|
479 end
|
wolffd@0
|
480 Handle = findobj(gcf,'Tag','Listbox1');
|
wolffd@0
|
481 %%%%%% if is empty string#%%%
|
wolffd@0
|
482 set(Handle,'String',names);
|
wolffd@0
|
483 else
|
wolffd@0
|
484 errmsg = 'Select browse type: Workspace or file.';
|
wolffd@0
|
485 errordlg(errmsg,'Browse error!');
|
wolffd@0
|
486 return;
|
wolffd@0
|
487 end
|
wolffd@0
|
488
|
wolffd@0
|
489
|
wolffd@0
|
490 function [] = works_ok()
|
wolffd@0
|
491 global HANDLE2;
|
wolffd@0
|
492 Handle = findobj(gcbf,'Tag','Listbox1');
|
wolffd@0
|
493 temp = get(Handle,'String');
|
wolffd@0
|
494 val = get(Handle,'Value');
|
wolffd@0
|
495 data = temp{val};
|
wolffd@0
|
496 Handle = findobj(HANDLE2,'Tag','EditText1');
|
wolffd@0
|
497 set(Handle,'String',data);
|
wolffd@0
|
498 close;
|
wolffd@0
|
499
|
wolffd@0
|
500
|
wolffd@0
|
501 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
502 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
503 %%%%%%%%%%%%%%%%% END OF LOAD SECTION %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
504 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
505 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
506
|
wolffd@0
|
507
|
wolffd@0
|
508 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
509 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
510 %%%%%%%%%%%%%%%%% START OF INITIALIZATION %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
511 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
513
|
wolffd@0
|
514 function [] = def_initialization()
|
wolffd@0
|
515 global DATA STOPOLINIT INIT_TYPE;
|
wolffd@0
|
516 sTopol = som_topol_struct('data',DATA);
|
wolffd@0
|
517 Handle = findobj(gcf,'Tag','StaticText5');
|
wolffd@0
|
518 temp = num2str(sTopol.msize);
|
wolffd@0
|
519 temp = strcat('map size:',' [',temp,']');
|
wolffd@0
|
520 set(Handle,'String',temp);
|
wolffd@0
|
521 Handle = findobj(gcf,'Tag','StaticText6');
|
wolffd@0
|
522 set(Handle,'String','type: linear');
|
wolffd@0
|
523 Handle = findobj(gcf,'Tag','StaticText20');
|
wolffd@0
|
524 temp = strcat('lattice:',sTopol.lattice);
|
wolffd@0
|
525 set(Handle,'String',temp);
|
wolffd@0
|
526 Handle = findobj(gcf,'Tag','StaticText21');
|
wolffd@0
|
527 temp = strcat('shape:',sTopol.shape);
|
wolffd@0
|
528 set(Handle,'String',temp);
|
wolffd@0
|
529 STOPOLINIT = sTopol;
|
wolffd@0
|
530 INIT_TYPE = 'linear';
|
wolffd@0
|
531
|
wolffd@0
|
532 function [] = change_initialization()
|
wolffd@0
|
533 global INIT_TYPE STOPOLINIT;
|
wolffd@0
|
534 initialization2;
|
wolffd@0
|
535 Handle = findobj(gcf,'Tag','PopupMenu1');
|
wolffd@0
|
536 temp = get(Handle,'String');
|
wolffd@0
|
537 val = loop(temp,INIT_TYPE);
|
wolffd@0
|
538 set(Handle,'Value',val);
|
wolffd@0
|
539 Handle = findobj(gcf,'Tag','PopupMenu2');
|
wolffd@0
|
540 temp = get(Handle,'String');
|
wolffd@0
|
541 val = loop(temp,STOPOLINIT.lattice);
|
wolffd@0
|
542 set(Handle,'Value',val);
|
wolffd@0
|
543 Handle = findobj(gcf,'Tag','PopupMenu3');
|
wolffd@0
|
544 temp = get(Handle,'String');
|
wolffd@0
|
545 val = loop(temp,STOPOLINIT.shape);
|
wolffd@0
|
546 set(Handle,'Value',val);
|
wolffd@0
|
547 Handle = findobj(gcf,'Tag','EditText1');
|
wolffd@0
|
548 temp = num2str(STOPOLINIT.msize);
|
wolffd@0
|
549 msize = strcat('[',temp,']');
|
wolffd@0
|
550 set(Handle,'String',msize);
|
wolffd@0
|
551
|
wolffd@0
|
552 function [] = change_initialization_ok()
|
wolffd@0
|
553 Handle = findobj(gcbf,'Tag','PopupMenu1');
|
wolffd@0
|
554 temp = get(Handle,'String');
|
wolffd@0
|
555 val = get(Handle,'Value');
|
wolffd@0
|
556 INIT_TYPE = temp{val};
|
wolffd@0
|
557 Handle = findobj(gcbf,'Tag','PopupMenu2');
|
wolffd@0
|
558 temp = get(Handle,'String');
|
wolffd@0
|
559 val = get(Handle,'Value');
|
wolffd@0
|
560 lattice = temp{val};
|
wolffd@0
|
561 Handle = findobj(gcbf,'Tag','PopupMenu3');
|
wolffd@0
|
562 temp = get(Handle,'String');
|
wolffd@0
|
563 val = get(Handle,'Value');
|
wolffd@0
|
564 shape = temp{val};
|
wolffd@0
|
565 Handle = findobj(gcbf,'Tag','EditText1');
|
wolffd@0
|
566 temp = get(Handle,'String');
|
wolffd@0
|
567 msize = str2num(temp);
|
wolffd@0
|
568 STOPOLINIT = som_set('som_topol','msize',msize,'lattice',lattice,'shape',shape);
|
wolffd@0
|
569 close(gcf);
|
wolffd@0
|
570 Handle = findobj(gcf,'Tag','StaticText5');
|
wolffd@0
|
571 temp = num2str(STOPOLINIT.msize);
|
wolffd@0
|
572 temp = strcat('map size:',' [',temp,']');
|
wolffd@0
|
573 set(Handle,'String',temp);
|
wolffd@0
|
574 Handle = findobj(gcf,'Tag','StaticText6');
|
wolffd@0
|
575 temp = strcat('type:',INIT_TYPE);
|
wolffd@0
|
576 set(Handle,'String',temp);
|
wolffd@0
|
577 Handle = findobj(gcf,'Tag','StaticText20');
|
wolffd@0
|
578 temp = strcat('lattice:',STOPOLINIT.lattice);
|
wolffd@0
|
579 set(Handle,'String',temp);
|
wolffd@0
|
580 Handle = findobj(gcf,'Tag','StaticText21');
|
wolffd@0
|
581 temp = strcat('shape:',STOPOLINIT.shape);
|
wolffd@0
|
582 set(Handle,'String',temp);
|
wolffd@0
|
583
|
wolffd@0
|
584
|
wolffd@0
|
585 function [] = def_values_others()
|
wolffd@0
|
586 global SOTHERS;
|
wolffd@0
|
587 Handle = findobj(gcf,'Tag','StaticText19');
|
wolffd@0
|
588 temp = strcat('tracking:',SOTHERS.tracking);
|
wolffd@0
|
589 set(Handle,'String',temp);
|
wolffd@0
|
590 Handle = findobj(gcf,'Tag','StaticText12');
|
wolffd@0
|
591 temp = strcat('order:',SOTHERS.oder);
|
wolffd@0
|
592 set(Handle,'String',temp);
|
wolffd@0
|
593 Handle = findobj(gcf,'Tag','StaticText14');
|
wolffd@0
|
594 temp = strcat('length_type:',SOTHERS.length_type);
|
wolffd@0
|
595 set(Handle,'String',temp);
|
wolffd@0
|
596
|
wolffd@0
|
597
|
wolffd@0
|
598
|
wolffd@0
|
599 function [] = fill_fields()
|
wolffd@0
|
600 global STRAIN1 STRAIN2 ALGORITHM
|
wolffd@0
|
601
|
wolffd@0
|
602 neigh = STRAIN1.neigh;
|
wolffd@0
|
603 mask = STRAIN1.mask;
|
wolffd@0
|
604 rad_ini1 = STRAIN1.radius_ini;
|
wolffd@0
|
605 rad_ini2 = STRAIN2.radius_ini;
|
wolffd@0
|
606 rad_fin1 = STRAIN1.radius_fin;
|
wolffd@0
|
607 rad_fin2 = STRAIN2.radius_fin;
|
wolffd@0
|
608 trainlen1 = num2str(STRAIN1.trainlen);
|
wolffd@0
|
609 trainlen2 = num2str(STRAIN2.trainlen);
|
wolffd@0
|
610 alpha_ini1 = num2str(STRAIN1.alpha_ini);
|
wolffd@0
|
611 alpha_ini2 = num2str(STRAIN2.alpha_ini);
|
wolffd@0
|
612 if strcmp(ALGORITHM,'seq')
|
wolffd@0
|
613 alpha_type = STRAIN1.alpha_type; %%% only in sequential
|
wolffd@0
|
614 Handle = findobj(gcf,'Tag','StaticText28');
|
wolffd@0
|
615 temp = strcat('alpha type:',alpha_type);
|
wolffd@0
|
616 set(Handle,'String',temp);
|
wolffd@0
|
617 end
|
wolffd@0
|
618 Handle = findobj(gcf,'Tag','StaticText11');
|
wolffd@0
|
619 temp = strcat('neigh: ',neigh);
|
wolffd@0
|
620 set(Handle,'String',temp);
|
wolffd@0
|
621 Handle = findobj(gcf,'Tag','StaticText22');
|
wolffd@0
|
622 temp = num2str(rad_fin1);
|
wolffd@0
|
623 temp = strcat('radius final:',temp);
|
wolffd@0
|
624 set(Handle,'String',temp);
|
wolffd@0
|
625 Handle = findobj(gcf,'Tag','StaticText25');
|
wolffd@0
|
626 temp = num2str(rad_fin2);
|
wolffd@0
|
627 temp = strcat('radius final:',temp);
|
wolffd@0
|
628 set(Handle,'String',temp);
|
wolffd@0
|
629 Handle = findobj(gcf,'Tag','StaticText11');
|
wolffd@0
|
630 temp = strcat('neigh: ',neigh);
|
wolffd@0
|
631 set(Handle,'String',temp);
|
wolffd@0
|
632 Handle = findobj(gcf,'Tag','StaticText17');
|
wolffd@0
|
633 temp = num2str(rad_ini1);
|
wolffd@0
|
634 temp = strcat('radius initial:',temp);
|
wolffd@0
|
635 set(Handle,'String',temp);
|
wolffd@0
|
636 Handle = findobj(gcf,'Tag','StaticText24');
|
wolffd@0
|
637 temp = num2str(rad_ini2);
|
wolffd@0
|
638 temp = strcat('radius initial:',temp);
|
wolffd@0
|
639 set(Handle,'String',temp);
|
wolffd@0
|
640 Handle = findobj(gcf,'Tag','StaticText16');
|
wolffd@0
|
641 temp = num2str(trainlen1);
|
wolffd@0
|
642 temp = strcat('training length:',temp);
|
wolffd@0
|
643 set(Handle,'String',temp);
|
wolffd@0
|
644 Handle = findobj(gcf,'Tag','StaticText23');
|
wolffd@0
|
645 temp = num2str(trainlen2);
|
wolffd@0
|
646 temp = strcat('training length:',temp);
|
wolffd@0
|
647 set(Handle,'String',temp);
|
wolffd@0
|
648 Handle = findobj(gcf,'Tag','StaticText26');
|
wolffd@0
|
649 temp = strcat('alpha initial:',alpha_ini1);
|
wolffd@0
|
650 set(Handle,'String',temp);
|
wolffd@0
|
651 Handle = findobj(gcf,'Tag','StaticText27');
|
wolffd@0
|
652 temp = strcat('alpha initial:',alpha_ini2);
|
wolffd@0
|
653 set(Handle,'String',temp);
|
wolffd@0
|
654
|
wolffd@0
|
655
|
wolffd@0
|
656 function [] = init();
|
wolffd@0
|
657 global INIT_TYPE MAP NEWMAP ALGORITHM SOTHERS DATA STOPOLINIT;
|
wolffd@0
|
658 if strcmp(INIT_TYPE,'random')
|
wolffd@0
|
659 MAP = som_randinit(DATA,STOPOLINIT);
|
wolffd@0
|
660 else
|
wolffd@0
|
661 MAP = som_lininit(DATA,STOPOLINIT);
|
wolffd@0
|
662 end
|
wolffd@0
|
663 NEWMAP = MAP;
|
wolffd@0
|
664 temp = 'Map:';
|
wolffd@0
|
665 temp = strcat(temp,' <',MAP.name,'>');
|
wolffd@0
|
666 Handle = findobj(gcbf,'Tag','StaticText3');
|
wolffd@0
|
667 set(Handle,'String',temp);
|
wolffd@0
|
668 Handle = findobj(gcbf,'Tag','StaticText10');
|
wolffd@0
|
669 set(Handle,'String','Status <map initialized>');
|
wolffd@0
|
670 ALGORITHM = 'batch';
|
wolffd@0
|
671 Handle = findobj(gcbf,'Tag','Pushbutton4');
|
wolffd@0
|
672 set(Handle,'Enable','off');
|
wolffd@0
|
673 Handle = findobj(gcbf,'Tag','Pushbutton6');
|
wolffd@0
|
674 set(Handle,'Enable','on');
|
wolffd@0
|
675 Handle = findobj(gcbf,'Tag','Pushbutton5');
|
wolffd@0
|
676 set(Handle,'Enable','on');
|
wolffd@0
|
677 SOTHERS.tracking = '1';
|
wolffd@0
|
678 SOTHERS.length_type = 'epochs';
|
wolffd@0
|
679 SOTHERS.oder = 'random';
|
wolffd@0
|
680 som_gui('def_values_topol');
|
wolffd@0
|
681 som_gui('def_values_train');
|
wolffd@0
|
682 som_gui('def_values_others');
|
wolffd@0
|
683 som_gui('fill_fields');
|
wolffd@0
|
684 Handle = findobj(gcbf,'Tag','Pushbutton4');
|
wolffd@0
|
685 set(Handle,'Enable','off');
|
wolffd@0
|
686 Handle = findobj(gcbf,'Tag','Pushbutton9');
|
wolffd@0
|
687 set(Handle,'Enable','off');
|
wolffd@0
|
688 Handle = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
689 set(Handle,'Enable','on');
|
wolffd@0
|
690 Handle = findobj(gcbf,'Tag','&Init&TrainChange initialization valuesuimenu1');
|
wolffd@0
|
691 set(Handle,'Enable','on');
|
wolffd@0
|
692 Handle = findobj(gcbf,'Tag','&Init&TrainTrain1');
|
wolffd@0
|
693 set(Handle,'Enable','on');
|
wolffd@0
|
694 Handle = findobj(gcbf,'Tag','&Help/InfoData infouimenu1');
|
wolffd@0
|
695 set(Handle,'Enable','on');
|
wolffd@0
|
696 Handle = findobj(gcbf,'Tag','Subuimenu2');
|
wolffd@0
|
697 set(Handle,'Enable','off');
|
wolffd@0
|
698 Handle = findobj(gcbf,'Tag','&Init&Trainuimenu1');
|
wolffd@0
|
699 set(Handle,'Enable','off');
|
wolffd@0
|
700 Handle = findobj(gcbf,'Tag','&Init&TrainInitialize1');
|
wolffd@0
|
701 set(Handle,'Enable','off'); %%%%%%%%%%%??????????
|
wolffd@0
|
702 Handle = findobj(gcbf,'Tag','StaticText9');
|
wolffd@0
|
703 set(Handle,'String','training type: batch');
|
wolffd@0
|
704
|
wolffd@0
|
705
|
wolffd@0
|
706
|
wolffd@0
|
707 function [] = set_batch_mask()
|
wolffd@0
|
708 Handle = findobj(gcbf,'Tag','Listbox2');
|
wolffd@0
|
709 temp = get(Handle,'String');
|
wolffd@0
|
710 mask = str2num(temp);
|
wolffd@0
|
711 Handle = findobj(gcbf,'Tag','Listbox1');
|
wolffd@0
|
712 replace = get(Handle,'Value');
|
wolffd@0
|
713 Handle = findobj(gcbf,'Tag','EditText2');
|
wolffd@0
|
714 temp = get(Handle,'String');
|
wolffd@0
|
715 value = str2num(temp);
|
wolffd@0
|
716 if not(isempty(value))
|
wolffd@0
|
717 mask(replace) = value;
|
wolffd@0
|
718 Handle = findobj(gcbf,'Tag','Listbox2');
|
wolffd@0
|
719 temp = num2str(mask);
|
wolffd@0
|
720 set(Handle,'String',temp);
|
wolffd@0
|
721 end
|
wolffd@0
|
722
|
wolffd@0
|
723 function [] = munits()
|
wolffd@0
|
724 global DATA STOPOLINIT;
|
wolffd@0
|
725 msgs = {'Correct map units is number';'Correct map units is number'};
|
wolffd@0
|
726 [msgs_nro, value] = check_ok('EditText2');
|
wolffd@0
|
727 if msgs_nro > 0
|
wolffd@0
|
728 errordlg({msgs{msgs_nro}},'Incorrect map units!')
|
wolffd@0
|
729 return;
|
wolffd@0
|
730 end
|
wolffd@0
|
731 STOPOLINIT = som_topol_struct('munits',value,'data',DATA);
|
wolffd@0
|
732 Handle = findobj(gcbf,'Tag','EditText1');
|
wolffd@0
|
733 temp = num2str(STOPOLINIT.msize);
|
wolffd@0
|
734 msize = strcat('[',temp,']');
|
wolffd@0
|
735 set(Handle,'String',msize);
|
wolffd@0
|
736
|
wolffd@0
|
737 function [] = map_size()
|
wolffd@0
|
738 global STOPOLINIT;
|
wolffd@0
|
739 msgs = {'Map size must be in form [x y]';...
|
wolffd@0
|
740 'Map size must be in form [x y]'};
|
wolffd@0
|
741 [msgs_nro, value, Handle] = msize_ok('EditText1');
|
wolffd@0
|
742 if msgs_nro > 0
|
wolffd@0
|
743 errordlg({msgs{msgs_nro}},'Incorrect map size!');
|
wolffd@0
|
744 temp = num2str(STOPOLINIT.msize);
|
wolffd@0
|
745 temp = strcat('[',temp,']');
|
wolffd@0
|
746 set(Handle,'String',temp);
|
wolffd@0
|
747 return;
|
wolffd@0
|
748 end
|
wolffd@0
|
749 STOPOLINIT.msize = value;
|
wolffd@0
|
750 Handle = findobj(gcbf,'Tag','EditText2');
|
wolffd@0
|
751 set(Handle,'String','');
|
wolffd@0
|
752
|
wolffd@0
|
753
|
wolffd@0
|
754 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
755 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
756 %%%%%%%%%%%%%%%%% END OF INITIALIZATION %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
757 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
758 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
759
|
wolffd@0
|
760
|
wolffd@0
|
761 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
762 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
763 %%%%%%%%%%%%%%%%% START OF TRAINING %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
764 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
765 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
766
|
wolffd@0
|
767
|
wolffd@0
|
768 function [] = def_train()
|
wolffd@0
|
769 global SOTHERS ALGORITHM MAP NEWST DATA STRAIN1 STRAIN2 MAPSAVED;
|
wolffd@0
|
770 tlen_type = SOTHERS.length_type;
|
wolffd@0
|
771 sample_order = SOTHERS.oder;
|
wolffd@0
|
772 tracking = SOTHERS.tracking;
|
wolffd@0
|
773 test = str2num(tracking);
|
wolffd@0
|
774 Handle = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
775 tempval = get(Handle,'Value');
|
wolffd@0
|
776 if strcmp(ALGORITHM,'seq')
|
wolffd@0
|
777 if tempval ~= 1
|
wolffd@0
|
778 [MAP NEWST] = som_seqtrain(MAP,DATA,'train',STRAIN1,tlen_type,sample_order);
|
wolffd@0
|
779 end
|
wolffd@0
|
780 if test > 1
|
wolffd@0
|
781 figure;
|
wolffd@0
|
782 set(gcf,'Name',MAP.name);
|
wolffd@0
|
783 set(gcf,'NumberTitle','off');
|
wolffd@0
|
784 end
|
wolffd@0
|
785 [NEWMAP NEWST] = som_seqtrain(MAP,DATA,'train',STRAIN2,'tracking',test,tlen_type,sample_order);
|
wolffd@0
|
786 else
|
wolffd@0
|
787 if tempval ~= 1
|
wolffd@0
|
788 [MAP NEWST] = som_batchtrain(MAP,DATA,'train',STRAIN1);
|
wolffd@0
|
789 end
|
wolffd@0
|
790 if test > 1
|
wolffd@0
|
791 figure;
|
wolffd@0
|
792 set(gcf,'Name',MAP.name);
|
wolffd@0
|
793 set(gcf,'NumberTitle','off');
|
wolffd@0
|
794 end
|
wolffd@0
|
795 [NEWMAP NEWST] = som_batchtrain(MAP,DATA,'train',STRAIN2,'tracking',test);
|
wolffd@0
|
796 end
|
wolffd@0
|
797 MAP = NEWMAP;
|
wolffd@0
|
798 clear MAPSAVED;
|
wolffd@0
|
799 Handle = findobj(gcbf,'Tag','StaticText10');
|
wolffd@0
|
800 set(Handle,'String','Status <map trained>');
|
wolffd@0
|
801 Handle = findobj(gcbf,'Tag','Load/SaveSubuimenu1');
|
wolffd@0
|
802 set(Handle,'Enable','on');
|
wolffd@0
|
803 Handle = findobj(gcbf,'Tag','Load/SaveSave mapuimenu1');
|
wolffd@0
|
804 set(Handle,'Enable','on');
|
wolffd@0
|
805 Handle = findobj(gcbf,'Tag','&Load/SaveSave mapSave in workspaceuimenu1');
|
wolffd@0
|
806 set(Handle,'Enable','on');
|
wolffd@0
|
807 Handle = findobj(gcbf,'Tag','&ToolsSubuimenu1');
|
wolffd@0
|
808 set(Handle,'Enable','on');
|
wolffd@0
|
809 Handle = findobj(gcbf,'Tag','&Init&TrainChange initialization valuesuimenu1');
|
wolffd@0
|
810 set(Handle,'Enable','off');
|
wolffd@0
|
811 Handle = findobj(gcbf,'Tag','&Init&TrainTrain1');
|
wolffd@0
|
812 set(Handle,'Enable','off');
|
wolffd@0
|
813
|
wolffd@0
|
814
|
wolffd@0
|
815 function [] = change_def()
|
wolffd@0
|
816 global ALGORITHM STRAIN1 DATA;
|
wolffd@0
|
817
|
wolffd@0
|
818 ButtonName = questdlg('Select training type!',...
|
wolffd@0
|
819 'Change values.',...
|
wolffd@0
|
820 'Batch','Sequential','Cancel',...
|
wolffd@0
|
821 'Batch');
|
wolffd@0
|
822 if strcmp(ButtonName,'Sequential')
|
wolffd@0
|
823 Handle = findobj(gcbf,'Visible','off');
|
wolffd@0
|
824 set(Handle,'Visible','on');
|
wolffd@0
|
825 ALGORITHM = 'seq';
|
wolffd@0
|
826 Handle = findobj(gcf,'Tag','StaticText9');
|
wolffd@0
|
827 set(Handle,'String','training type: sequential');
|
wolffd@0
|
828 new_para2_2;
|
wolffd@0
|
829 Handle = findobj(gcf,'Tag','StaticText1');
|
wolffd@0
|
830 set(Handle,'String','Change parameters for sequential training');
|
wolffd@0
|
831 Handle = findobj(gcf,'Enable','off');
|
wolffd@0
|
832 set(Handle,'Enable','on');
|
wolffd@0
|
833 Handle = findobj(gcf,'Visible','off');
|
wolffd@0
|
834 set(Handle,'Visible','on');
|
wolffd@0
|
835 elseif strcmp(ButtonName,'Batch')
|
wolffd@0
|
836 ALGORITHM = 'batch';
|
wolffd@0
|
837 Handle = findobj(gcbf,'Tag','StaticText26');
|
wolffd@0
|
838 set(Handle,'Visible','off');
|
wolffd@0
|
839 Handle = findobj(gcbf,'Tag','StaticText27');
|
wolffd@0
|
840 set(Handle,'Visible','off');
|
wolffd@0
|
841 Handle = findobj(gcf,'Tag','StaticText9');
|
wolffd@0
|
842 set(Handle,'String','training type: batch');
|
wolffd@0
|
843 Handle = findobj(gcf,'Tag','StaticText12');
|
wolffd@0
|
844 set(Handle,'Visible','off');
|
wolffd@0
|
845 Handle = findobj(gcf,'Tag','StaticText28');
|
wolffd@0
|
846 set(Handle,'Visible','off');
|
wolffd@0
|
847 Handle = findobj(gcf,'Tag','StaticText14');
|
wolffd@0
|
848 set(Handle,'Visible','off');
|
wolffd@0
|
849 new_para2_2;
|
wolffd@0
|
850 Handle = findobj(gcf,'Tag','StaticText1');
|
wolffd@0
|
851 set(Handle,'String','Change parameters for batch training');
|
wolffd@0
|
852 Handle = findobj(gcf,'Tag','PopupMenu3');
|
wolffd@0
|
853 set(Handle,'Enable','off');
|
wolffd@0
|
854 set(Handle,'Visible','off');
|
wolffd@0
|
855 Handle = findobj(gcf,'Tag','PopupMenu4');
|
wolffd@0
|
856 set(Handle,'Enable','off');
|
wolffd@0
|
857 set(Handle,'Visible','off');
|
wolffd@0
|
858 Handle = findobj(gcf,'Tag','PopupMenu5');
|
wolffd@0
|
859 set(Handle,'Enable','off');
|
wolffd@0
|
860 set(Handle,'Visible','off');
|
wolffd@0
|
861 Handle = findobj(gcf,'Tag','StaticText17');
|
wolffd@0
|
862 set(Handle,'Visible','off');
|
wolffd@0
|
863 Handle = findobj(gcf,'Tag','StaticText18');
|
wolffd@0
|
864 set(Handle,'Visible','off');
|
wolffd@0
|
865 Handle = findobj(gcf,'Tag','StaticText19');
|
wolffd@0
|
866 set(Handle,'Visible','off');
|
wolffd@0
|
867 Handle = findobj(gcf,'Tag','StaticText13');
|
wolffd@0
|
868 set(Handle,'Visible','off');
|
wolffd@0
|
869 Handle = findobj(gcf,'Tag','StaticText14');
|
wolffd@0
|
870 set(Handle,'Visible','off');
|
wolffd@0
|
871 Handle = findobj(gcf,'Tag','EditText6');
|
wolffd@0
|
872 set(Handle,'Visible','off');
|
wolffd@0
|
873 set(Handle,'Enable','off');
|
wolffd@0
|
874 Handle = findobj(gcf,'Tag','EditText10');
|
wolffd@0
|
875 set(Handle,'Visible','off');
|
wolffd@0
|
876 set(Handle,'Enable','off');
|
wolffd@0
|
877 else
|
wolffd@0
|
878 return;
|
wolffd@0
|
879 end
|
wolffd@0
|
880 som_gui('def_values_train');
|
wolffd@0
|
881 mask = STRAIN1.mask;
|
wolffd@0
|
882 Handle = findobj(gcf,'Tag','Listbox1');
|
wolffd@0
|
883 set(Handle,'String',DATA.comp_names);
|
wolffd@0
|
884 som_gui('fill_new_defaults');
|
wolffd@0
|
885
|
wolffd@0
|
886
|
wolffd@0
|
887 function [] = fill_new_defaults()
|
wolffd@0
|
888 global STRAIN1 STRAIN2 SOTHERS ALGORITHM;
|
wolffd@0
|
889
|
wolffd@0
|
890 Handle = findobj(gcf,'Tag','EditText4');
|
wolffd@0
|
891 temp = num2str(STRAIN1.radius_ini);
|
wolffd@0
|
892 set(Handle,'String',temp);
|
wolffd@0
|
893 Handle = findobj(gcf,'Tag','EditText8');
|
wolffd@0
|
894 temp = num2str(STRAIN2.radius_ini);
|
wolffd@0
|
895 set(Handle,'String',temp);
|
wolffd@0
|
896 Handle = findobj(gcf,'Tag','EditText5');
|
wolffd@0
|
897 temp = num2str(STRAIN1.radius_fin);
|
wolffd@0
|
898 set(Handle,'String',temp);
|
wolffd@0
|
899 Handle = findobj(gcf,'Tag','EditText9');
|
wolffd@0
|
900 temp = num2str(STRAIN2.radius_fin);
|
wolffd@0
|
901 set(Handle,'String',temp);
|
wolffd@0
|
902 Handle = findobj(gcf,'Tag','EditText6');
|
wolffd@0
|
903 temp = num2str(STRAIN1.alpha_ini);
|
wolffd@0
|
904 set(Handle,'String',temp);
|
wolffd@0
|
905 Handle = findobj(gcf,'Tag','EditText10');
|
wolffd@0
|
906 temp = num2str(STRAIN2.alpha_ini);
|
wolffd@0
|
907 set(Handle,'String',temp);
|
wolffd@0
|
908 Handle = findobj(gcf,'Tag','EditText7');
|
wolffd@0
|
909 temp = num2str(STRAIN1.trainlen);
|
wolffd@0
|
910 set(Handle,'String',temp);
|
wolffd@0
|
911 Handle = findobj(gcf,'Tag','EditText11');
|
wolffd@0
|
912 temp = num2str(STRAIN2.trainlen);
|
wolffd@0
|
913 set(Handle,'String',temp);
|
wolffd@0
|
914 Handle = findobj(gcf,'Tag','Listbox2');
|
wolffd@0
|
915 temp = num2str(STRAIN1.mask');
|
wolffd@0
|
916 set(Handle,'String',temp);
|
wolffd@0
|
917 Handle = findobj(gcf,'Tag','PopupMenu2');
|
wolffd@0
|
918 string = get(Handle,'String');
|
wolffd@0
|
919 val = loop(string,SOTHERS.tracking);
|
wolffd@0
|
920 set(Handle,'Value',val);
|
wolffd@0
|
921 Handle = findobj(gcf,'Tag','PopupMenu1');
|
wolffd@0
|
922 string = get(Handle,'String');
|
wolffd@0
|
923 val = loop(string,STRAIN1.neigh);
|
wolffd@0
|
924 set(Handle,'Value',val);
|
wolffd@0
|
925 if strcmp(ALGORITHM,'seq')
|
wolffd@0
|
926 Handle = findobj(gcf,'Tag','PopupMenu3');
|
wolffd@0
|
927 string = get(Handle,'String');
|
wolffd@0
|
928 val = loop(string,SOTHERS.length_type);
|
wolffd@0
|
929 set(Handle,'Value',val);
|
wolffd@0
|
930 Handle = findobj(gcf,'Tag','PopupMenu4');
|
wolffd@0
|
931 string = get(Handle,'String');
|
wolffd@0
|
932 val = loop(string,SOTHERS.oder);
|
wolffd@0
|
933 set(Handle,'Value',val);
|
wolffd@0
|
934 Handle = findobj(gcf,'Tag','PopupMenu5');
|
wolffd@0
|
935 string = get(Handle,'String');
|
wolffd@0
|
936 val = loop(string,STRAIN1.alpha_type);
|
wolffd@0
|
937 set(Handle,'Value',val);
|
wolffd@0
|
938 end
|
wolffd@0
|
939
|
wolffd@0
|
940
|
wolffd@0
|
941
|
wolffd@0
|
942 function [] = set_new_parameters()
|
wolffd@0
|
943 global STRAIN1 STRAIN2 ALGORITHM SOTHERS;
|
wolffd@0
|
944
|
wolffd@0
|
945 Handle = findobj(gcbf,'Tag','Listbox2');
|
wolffd@0
|
946 temp = get(Handle,'String');
|
wolffd@0
|
947 mask = str2num(temp); %%%%%%%%%%%%% Do somthing
|
wolffd@0
|
948 mask = mask';
|
wolffd@0
|
949 Handle = findobj(gcbf,'Tag','PopupMenu1');
|
wolffd@0
|
950 temp = get(Handle,'String');
|
wolffd@0
|
951 val = get(Handle,'Value');
|
wolffd@0
|
952 neigh = temp{val};
|
wolffd@0
|
953 Handle = findobj(gcbf,'Tag','PopupMenu2');
|
wolffd@0
|
954 temp = get(Handle,'String');
|
wolffd@0
|
955 val = get(Handle,'Value');
|
wolffd@0
|
956 SOTHERS.tracking = temp{val}; %%%%% finetune phase!
|
wolffd@0
|
957 Handle = findobj(gcbf,'Tag','EditText4');
|
wolffd@0
|
958 temp = get(Handle,'String');
|
wolffd@0
|
959 rad_ini1 = str2num(temp);
|
wolffd@0
|
960 Handle = findobj(gcbf,'Tag','EditText8');
|
wolffd@0
|
961 temp = get(Handle,'String');
|
wolffd@0
|
962 rad_ini2 = str2num(temp);
|
wolffd@0
|
963 Handle = findobj(gcbf,'Tag','EditText5');
|
wolffd@0
|
964 temp = get(Handle,'String');
|
wolffd@0
|
965 rad_fin1 = str2num(temp);
|
wolffd@0
|
966 Handle = findobj(gcbf,'Tag','EditText9');
|
wolffd@0
|
967 temp = get(Handle,'String');
|
wolffd@0
|
968 rad_fin2 = str2num(temp);
|
wolffd@0
|
969 Handle = findobj(gcbf,'Tag','EditText6');
|
wolffd@0
|
970 temp = get(Handle,'String');
|
wolffd@0
|
971 alpha_ini1 = str2num(temp);
|
wolffd@0
|
972 Handle = findobj(gcbf,'Tag','EditText10');
|
wolffd@0
|
973 temp = get(Handle,'String');
|
wolffd@0
|
974 alpha_ini2 = str2num(temp);
|
wolffd@0
|
975 Handle = findobj(gcbf,'Tag','EditText7');
|
wolffd@0
|
976 temp = get(Handle,'String');
|
wolffd@0
|
977 train_length1 = str2num(temp);
|
wolffd@0
|
978 Handle = findobj(gcbf,'Tag','EditText11');
|
wolffd@0
|
979 temp = get(Handle,'String');
|
wolffd@0
|
980 train_length2 = str2num(temp);
|
wolffd@0
|
981 if strcmp(ALGORITHM,'seq')
|
wolffd@0
|
982 Handle = findobj(gcbf,'Tag','PopupMenu3');
|
wolffd@0
|
983 temp = get(Handle,'String');
|
wolffd@0
|
984 val = get(Handle,'Value');
|
wolffd@0
|
985 SOTHERS.length_type = temp{val};
|
wolffd@0
|
986 Handle = findobj(gcbf,'Tag','PopupMenu4');
|
wolffd@0
|
987 temp = get(Handle,'String');
|
wolffd@0
|
988 val = get(Handle,'Value');
|
wolffd@0
|
989 SOTHERS.oder= temp{val};
|
wolffd@0
|
990 Handle = findobj(gcbf,'Tag','PopupMenu5');
|
wolffd@0
|
991 temp = get(Handle,'String');
|
wolffd@0
|
992 val = get(Handle,'Value');
|
wolffd@0
|
993 alpha_type = temp{val};
|
wolffd@0
|
994 else
|
wolffd@0
|
995 alpha_type = 'inv';
|
wolffd@0
|
996 end
|
wolffd@0
|
997 STRAIN1.neigh = neigh;
|
wolffd@0
|
998 STRAIN2.neigh = neigh;
|
wolffd@0
|
999 STRAIN1.mask = mask;
|
wolffd@0
|
1000 STRAIN2.mask = mask;
|
wolffd@0
|
1001 STRAIN1.radius_ini = rad_ini1;
|
wolffd@0
|
1002 STRAIN2.radius_ini = rad_ini2;
|
wolffd@0
|
1003 STRAIN1.radius_fin = rad_fin1;
|
wolffd@0
|
1004 STRAIN2.radius_fin = rad_fin2;
|
wolffd@0
|
1005 STRAIN1.alpha_ini = alpha_ini1;
|
wolffd@0
|
1006 STRAIN2.alpha_ini = alpha_ini2;
|
wolffd@0
|
1007 STRAIN1.alpha_type = alpha_type;
|
wolffd@0
|
1008 STRAIN2.alpha_type = alpha_type;
|
wolffd@0
|
1009 STRAIN1.trainlen = train_length1;
|
wolffd@0
|
1010 STRAIN2.trainlen = train_length2;
|
wolffd@0
|
1011 close(gcbf);
|
wolffd@0
|
1012 som_gui('fill_fields');
|
wolffd@0
|
1013 som_gui('def_values_others');
|
wolffd@0
|
1014
|
wolffd@0
|
1015 function [] = only_finetune()
|
wolffd@0
|
1016
|
wolffd@0
|
1017 Handle = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
1018 test = get(Handle,'Value');
|
wolffd@0
|
1019 if test == 1
|
wolffd@0
|
1020 Handle = findobj(gcbf,'Tag','StaticText16');
|
wolffd@0
|
1021 set(Handle,'Enable','off');
|
wolffd@0
|
1022 Handle = findobj(gcbf,'Tag','StaticText17');
|
wolffd@0
|
1023 set(Handle,'Enable','off');
|
wolffd@0
|
1024 Handle = findobj(gcbf,'Tag','StaticText22');
|
wolffd@0
|
1025 set(Handle,'Enable','off');
|
wolffd@0
|
1026 Handle = findobj(gcbf,'Tag','StaticText26');
|
wolffd@0
|
1027 set(Handle,'Enable','off');
|
wolffd@0
|
1028 else
|
wolffd@0
|
1029 Handle = findobj(gcbf,'Tag','StaticText16');
|
wolffd@0
|
1030 set(Handle,'Enable','on');
|
wolffd@0
|
1031 Handle = findobj(gcbf,'Tag','StaticText17');
|
wolffd@0
|
1032 set(Handle,'Enable','on');
|
wolffd@0
|
1033 Handle = findobj(gcbf,'Tag','StaticText22');
|
wolffd@0
|
1034 set(Handle,'Enable','on');
|
wolffd@0
|
1035 Handle = findobj(gcbf,'Tag','StaticText26');
|
wolffd@0
|
1036 set(Handle,'Enable','on');
|
wolffd@0
|
1037 end
|
wolffd@0
|
1038
|
wolffd@0
|
1039
|
wolffd@0
|
1040 function [] = check_rough_radini()
|
wolffd@0
|
1041 global STRAIN1;
|
wolffd@0
|
1042 msgs = {'Initial radius must be number!';...
|
wolffd@0
|
1043 'Initial radius must be single valued number!'};
|
wolffd@0
|
1044 [msgs_nro, value, Handle] = check_ok('EditText4');
|
wolffd@0
|
1045 if msgs_nro > 0
|
wolffd@0
|
1046 errordlg({msgs{msgs_nro}},'Incorrect initial radius!')
|
wolffd@0
|
1047 temp = num2str(STRAIN1.radius_ini);
|
wolffd@0
|
1048 set(Handle,'String',temp);
|
wolffd@0
|
1049 return;
|
wolffd@0
|
1050 end
|
wolffd@0
|
1051
|
wolffd@0
|
1052
|
wolffd@0
|
1053 function [] = check_fine_radini()
|
wolffd@0
|
1054 global STRAIN2;
|
wolffd@0
|
1055 msgs = {'Initial radius must be number!';...
|
wolffd@0
|
1056 'Initial radius must be single valued number!'};
|
wolffd@0
|
1057 [msgs_nro, value, Handle] = check_ok('EditText8');
|
wolffd@0
|
1058 if msgs_nro > 0
|
wolffd@0
|
1059 errordlg({msgs{msgs_nro}},'Incorrect initial radius!')
|
wolffd@0
|
1060 temp = num2str(STRAIN2.radius_ini);
|
wolffd@0
|
1061 set(Handle,'String',temp);
|
wolffd@0
|
1062 return;
|
wolffd@0
|
1063 end
|
wolffd@0
|
1064
|
wolffd@0
|
1065 function [] = check_rough_radfin()
|
wolffd@0
|
1066 global STRAIN1;
|
wolffd@0
|
1067 msgs = {'Final radius must be number!';...
|
wolffd@0
|
1068 'Final radius must be single valued number!'};
|
wolffd@0
|
1069 [msgs_nro, value, Handle] = check_ok('EditText5');
|
wolffd@0
|
1070 if msgs_nro > 0
|
wolffd@0
|
1071 errordlg({msgs{msgs_nro}},'Incorrect final radius!')
|
wolffd@0
|
1072 temp = num2str(STRAIN1.radius_fin);
|
wolffd@0
|
1073 set(Handle,'String',temp);
|
wolffd@0
|
1074 return;
|
wolffd@0
|
1075 end
|
wolffd@0
|
1076
|
wolffd@0
|
1077 function [] = check_fine_radfin()
|
wolffd@0
|
1078 global STRAIN2;
|
wolffd@0
|
1079 msgs = {'Final radius must be number!';...
|
wolffd@0
|
1080 'Final radius must be single valued number!'};
|
wolffd@0
|
1081 [msgs_nro, value, Handle] = check_ok('EditText9');
|
wolffd@0
|
1082 if msgs_nro > 0
|
wolffd@0
|
1083 errordlg({msgs{msgs_nro}},'Incorrect final radius!')
|
wolffd@0
|
1084 temp = num2str(STRAIN2.radius_fin);
|
wolffd@0
|
1085 set(Handle,'String',temp);
|
wolffd@0
|
1086 return;
|
wolffd@0
|
1087 end
|
wolffd@0
|
1088
|
wolffd@0
|
1089 function [] = check_rough_alphaini()
|
wolffd@0
|
1090 global STRAIN1;
|
wolffd@0
|
1091 msgs = {'Alpha initial must be number!';...
|
wolffd@0
|
1092 'Alpha initial must be single valued number!'};
|
wolffd@0
|
1093 [msgs_nro, value, Handle] = check_ok('EditText6');
|
wolffd@0
|
1094 if msgs_nro > 0
|
wolffd@0
|
1095 errordlg({msgs{msgs_nro}},'Incorrect initial alpha!')
|
wolffd@0
|
1096 temp = num2str(STRAIN1.alpha_ini);
|
wolffd@0
|
1097 set(Handle,'String',temp);
|
wolffd@0
|
1098 return;
|
wolffd@0
|
1099 end
|
wolffd@0
|
1100
|
wolffd@0
|
1101 function [] = check_fine_alphaini()
|
wolffd@0
|
1102 global STRAIN2;
|
wolffd@0
|
1103 msgs = {'Alpha initial must be number!';...
|
wolffd@0
|
1104 'Alpha initial must be single valued number!'};
|
wolffd@0
|
1105 [msgs_nro, value, Handle] = check_ok('EditText10');
|
wolffd@0
|
1106 if msgs_nro > 0
|
wolffd@0
|
1107 errordlg({msgs{msgs_nro}},'Incorrect initial alpha!')
|
wolffd@0
|
1108 temp = num2str(STRAIN2.alpha_ini);
|
wolffd@0
|
1109 set(Handle,'String',temp);
|
wolffd@0
|
1110 return;
|
wolffd@0
|
1111 end
|
wolffd@0
|
1112
|
wolffd@0
|
1113 function [] = check_rough_trainlen()
|
wolffd@0
|
1114 global STRAIN1;
|
wolffd@0
|
1115 msgs = {'Training length must be number!';...
|
wolffd@0
|
1116 'Training length must be single valued number!'};
|
wolffd@0
|
1117 [msgs_nro, value, Handle] = check_ok('EditText7');
|
wolffd@0
|
1118 if msgs_nro > 0
|
wolffd@0
|
1119 errordlg({msgs{msgs_nro}},'Incorrect training length!')
|
wolffd@0
|
1120 temp = num2str(STRAIN1.trainlen);
|
wolffd@0
|
1121 set(Handle,'String',temp);
|
wolffd@0
|
1122 return;
|
wolffd@0
|
1123 end
|
wolffd@0
|
1124
|
wolffd@0
|
1125 function [] = check_fine_trainlen()
|
wolffd@0
|
1126 global STRAIN2;
|
wolffd@0
|
1127
|
wolffd@0
|
1128 msgs = {'Training length must be number!';...
|
wolffd@0
|
1129 'Training length must be single valued number!'};
|
wolffd@0
|
1130 [msgs_nro, value, Handle] = check_ok('EditText11');
|
wolffd@0
|
1131 if msgs_nro > 0
|
wolffd@0
|
1132 errordlg({msgs{msgs_nro}},'Incorrect training length!')
|
wolffd@0
|
1133 temp = num2str(STRAIN2.trainlen);
|
wolffd@0
|
1134 set(Handle,'String',temp);
|
wolffd@0
|
1135 return;
|
wolffd@0
|
1136 end
|
wolffd@0
|
1137
|
wolffd@0
|
1138 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1139 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1140 %%%%%%%%%%%%%%%%% END OF TRAINING %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1141 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1143
|
wolffd@0
|
1144
|
wolffd@0
|
1145 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1146 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1147 %%%%%%%%%%%%%%%%% START OF SAVING %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1148 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1150
|
wolffd@0
|
1151
|
wolffd@0
|
1152 function [] = savemap()
|
wolffd@0
|
1153 global MAP MAPSAVED;
|
wolffd@0
|
1154 if isempty(MAP)
|
wolffd@0
|
1155 str = {'There is no map to be saved! Train map before saving.'};
|
wolffd@0
|
1156 helpdlg(str,'Empty map!');
|
wolffd@0
|
1157 return;
|
wolffd@0
|
1158 end
|
wolffd@0
|
1159 [FileName Path] = uiputfile('*.cod','Save file!');
|
wolffd@0
|
1160 if FileName ~= 0
|
wolffd@0
|
1161 temp = strcat(Path,FileName);
|
wolffd@0
|
1162 som_write_cod(MAP,temp);
|
wolffd@0
|
1163 MAPSAVED = 'SAVED';
|
wolffd@0
|
1164 end
|
wolffd@0
|
1165 Handle = findobj(gcf,'Tag','StaticText10');
|
wolffd@0
|
1166 set(Handle,'String','Status <map saved>');
|
wolffd@0
|
1167
|
wolffd@0
|
1168 function [] = save_workspace()
|
wolffd@0
|
1169 global MAP MAPSAVED;
|
wolffd@0
|
1170 if isempty(MAP)
|
wolffd@0
|
1171 str = {'There is no map to be saved! Train map before saving.'};
|
wolffd@0
|
1172 helpdlg(str,'Empty map!');
|
wolffd@0
|
1173 return;
|
wolffd@0
|
1174 else
|
wolffd@0
|
1175 prompt = {'Save map as?'};
|
wolffd@0
|
1176 title = 'Save map!';
|
wolffd@0
|
1177 lineNo = 1;
|
wolffd@0
|
1178 answer = inputdlg(prompt,title,lineNo);
|
wolffd@0
|
1179 if isempty(answer)
|
wolffd@0
|
1180 return;
|
wolffd@0
|
1181 end
|
wolffd@0
|
1182 if not(isempty(answer{1}))
|
wolffd@0
|
1183 ws_variable = evalin('base','who');
|
wolffd@0
|
1184 max_length = 0;
|
wolffd@0
|
1185 for index = 1:size(ws_variable,1)
|
wolffd@0
|
1186 if max_length < size(ws_variable{index},2)
|
wolffd@0
|
1187 max_length = size(ws_variable{index},2);
|
wolffd@0
|
1188 end
|
wolffd@0
|
1189 end
|
wolffd@0
|
1190 length = max_length + 1;
|
wolffd@0
|
1191 tempfoo(1:1:length) = 'A';
|
wolffd@0
|
1192 assignin('base',tempfoo,answer{1});
|
wolffd@0
|
1193 str = ['exist(' tempfoo ')'];
|
wolffd@0
|
1194 temp = evalin('base',str); %%%%%%%%%%@@@@@@@@@
|
wolffd@0
|
1195 evalin('base',['clear ' tempfoo ])
|
wolffd@0
|
1196 if temp == 0
|
wolffd@0
|
1197 assignin('base',answer{1},MAP);
|
wolffd@0
|
1198 MAPSAVED = 'SAVED';
|
wolffd@0
|
1199 elseif temp ~= 0
|
wolffd@0
|
1200 Questmsg = strcat('Variable',' ''',answer{1},'''',...
|
wolffd@0
|
1201 ' exist. Overwrite?');
|
wolffd@0
|
1202 ButtonName = questdlg(Questmsg);
|
wolffd@0
|
1203 switch(ButtonName)
|
wolffd@0
|
1204 case 'Yes'
|
wolffd@0
|
1205 assignin('base',answer{1},MAP);
|
wolffd@0
|
1206 MAPSAVED = 'SAVED';
|
wolffd@0
|
1207 case 'No'
|
wolffd@0
|
1208 som_gui('save_workspace');
|
wolffd@0
|
1209 end
|
wolffd@0
|
1210 end
|
wolffd@0
|
1211 else
|
wolffd@0
|
1212 helpmsg = {'There cannot be any empty field in ''save'''};
|
wolffd@0
|
1213 helpdlg(helpmsg,'Help Save!');
|
wolffd@0
|
1214 som_gui('save');
|
wolffd@0
|
1215 end
|
wolffd@0
|
1216 end
|
wolffd@0
|
1217 Handle = findobj(gcf,'Tag','StaticText10');
|
wolffd@0
|
1218 set(Handle,'String','Status <map saved>');
|
wolffd@0
|
1219
|
wolffd@0
|
1220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1221 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1222 %%%%%%%%%%%%%%%%% END OF SAVING %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1223 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1224 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1225
|
wolffd@0
|
1226 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1227 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1228 %%%%%%%%%%%%%%%%% START OF HELP & INFO %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1229 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1230 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1231
|
wolffd@0
|
1232 %HEREXX
|
wolffd@0
|
1233
|
wolffd@0
|
1234 function [] = data_info()
|
wolffd@0
|
1235 global DATA;
|
wolffd@0
|
1236 if isempty(DATA)
|
wolffd@0
|
1237 helpmsg = 'Load data first!';
|
wolffd@0
|
1238 helpdlg(helpmsg,'Empty data!');
|
wolffd@0
|
1239 return;
|
wolffd@0
|
1240 end
|
wolffd@0
|
1241 file_name = tempname;
|
wolffd@0
|
1242 file_name = strcat(file_name,'.m');
|
wolffd@0
|
1243 fid = fopen(file_name,'w');
|
wolffd@0
|
1244 fprintf(fid,'%% %+35s\n','DATA INFO');
|
wolffd@0
|
1245 fprintf(fid,'%%\n');
|
wolffd@0
|
1246 print_info(DATA,2,fid);
|
wolffd@0
|
1247 directory = tempdir;
|
wolffd@0
|
1248 addpath (directory);
|
wolffd@0
|
1249 helpwin (file_name);
|
wolffd@0
|
1250 fclose(fid);
|
wolffd@0
|
1251 delete(file_name);
|
wolffd@0
|
1252 rmpath (directory);
|
wolffd@0
|
1253
|
wolffd@0
|
1254
|
wolffd@0
|
1255 function [] = map_info()
|
wolffd@0
|
1256 global MAP;
|
wolffd@0
|
1257 if isempty(MAP)
|
wolffd@0
|
1258 helpmsg = 'There is no map!';
|
wolffd@0
|
1259 helpdlg(helpmsg,'Empty map!');
|
wolffd@0
|
1260 return;
|
wolffd@0
|
1261 end
|
wolffd@0
|
1262 file_name = tempname;
|
wolffd@0
|
1263 file_name = strcat(file_name,'.m');
|
wolffd@0
|
1264 fid = fopen(file_name,'w');
|
wolffd@0
|
1265 fprintf(fid,'%% %+35s\n','MAP INFO');
|
wolffd@0
|
1266 fprintf(fid,'%%\n');
|
wolffd@0
|
1267 print_info(MAP,2,fid);
|
wolffd@0
|
1268 directory = tempdir;
|
wolffd@0
|
1269 addpath (directory);
|
wolffd@0
|
1270 helpwin (file_name);
|
wolffd@0
|
1271 fclose(fid);
|
wolffd@0
|
1272 delete(file_name);
|
wolffd@0
|
1273 rmpath (directory);
|
wolffd@0
|
1274
|
wolffd@0
|
1275
|
wolffd@0
|
1276 function [] = helpwin1()
|
wolffd@0
|
1277 file1 = tempname;
|
wolffd@0
|
1278 file1 = strcat(file1,'.m');
|
wolffd@0
|
1279 directory = tempdir;
|
wolffd@0
|
1280 html2tex('file:///share/somtoolbox/vs2/html/som_GUI.html',file1);
|
wolffd@0
|
1281 addpath (directory);
|
wolffd@0
|
1282 helpwin (file1);
|
wolffd@0
|
1283 rmpath (directory);
|
wolffd@0
|
1284 delete (file1);
|
wolffd@0
|
1285
|
wolffd@0
|
1286
|
wolffd@0
|
1287
|
wolffd@0
|
1288
|
wolffd@0
|
1289 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1290 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1291 %%%%%%%%%%%%%%%%% END OF HELP & INFO %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1292 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1293 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1294
|
wolffd@0
|
1295
|
wolffd@0
|
1296
|
wolffd@0
|
1297 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1298 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1299 %%%%%%%%%%%%%%%%% START OF OTHER FUNC %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1300 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1301 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1302
|
wolffd@0
|
1303
|
wolffd@0
|
1304
|
wolffd@0
|
1305 function [msgs_nro, value, Handle] = check_ok(Tag)
|
wolffd@0
|
1306 Handle = findobj(gcbf,'Tag',Tag);
|
wolffd@0
|
1307 temp = get(Handle,'String');
|
wolffd@0
|
1308 value = str2num(temp);
|
wolffd@0
|
1309 if isempty(value)
|
wolffd@0
|
1310 msgs_nro = 1;
|
wolffd@0
|
1311 return;
|
wolffd@0
|
1312 end
|
wolffd@0
|
1313 [test1 test2] = size(value);
|
wolffd@0
|
1314 if test1 ~= 1 | test2 ~= 1
|
wolffd@0
|
1315 msgs_nro = 2;
|
wolffd@0
|
1316 return;
|
wolffd@0
|
1317 end
|
wolffd@0
|
1318 msgs_nro = 0;
|
wolffd@0
|
1319
|
wolffd@0
|
1320
|
wolffd@0
|
1321 function [msgs_nro, value, Handle] = msize_ok(Tag)
|
wolffd@0
|
1322 Handle = findobj(gcbf,'Tag',Tag);
|
wolffd@0
|
1323 temp = get(Handle,'String');
|
wolffd@0
|
1324 value = str2num(temp);
|
wolffd@0
|
1325 if isempty(value)
|
wolffd@0
|
1326 msgs_nro = 1;
|
wolffd@0
|
1327 return;
|
wolffd@0
|
1328 end
|
wolffd@0
|
1329 [test1 test2] = size(value);
|
wolffd@0
|
1330 if test1 ~= 1 | test2 ~= 2
|
wolffd@0
|
1331 msgs_nro = 2;
|
wolffd@0
|
1332 return;
|
wolffd@0
|
1333 end
|
wolffd@0
|
1334 msgs_nro = 0;
|
wolffd@0
|
1335
|
wolffd@0
|
1336
|
wolffd@0
|
1337 %%% Changed 1.2.2000
|
wolffd@0
|
1338
|
wolffd@0
|
1339 function [] = visualize()
|
wolffd@0
|
1340 global MAP;
|
wolffd@0
|
1341 if isempty(MAP)
|
wolffd@0
|
1342 helpmsg = {'Train map before tryinig to visualize it!'};
|
wolffd@0
|
1343 helpdlg(helpmsg,'Empty Map!');
|
wolffd@0
|
1344 return;
|
wolffd@0
|
1345 end
|
wolffd@0
|
1346
|
wolffd@0
|
1347 dim = size(MAP.codebook,2);
|
wolffd@0
|
1348 odim = 2;
|
wolffd@0
|
1349 [P,V] = pcaproj(MAP.codebook,odim);
|
wolffd@0
|
1350 ccode = som_colorcode(MAP, 'rgb1');
|
wolffd@0
|
1351
|
wolffd@0
|
1352 figure;
|
wolffd@0
|
1353 som_show(MAP,'umat','all','comp',1:dim,'norm','d');
|
wolffd@0
|
1354 figure;
|
wolffd@0
|
1355 subplot(1,2,1)
|
wolffd@0
|
1356 som_grid(MAP,'Coord',P,'MarkerColor',ccode,'Markersize',5, ...
|
wolffd@0
|
1357 'Linewidth',1,'Linecolor','k');
|
wolffd@0
|
1358 xlabel('PC1'), ylabel('PC2')
|
wolffd@0
|
1359 title('PCA-projection (on the left), color coding (on the right)')
|
wolffd@0
|
1360 axis tight, axis equal
|
wolffd@0
|
1361 subplot(1,2,2)
|
wolffd@0
|
1362 som_cplane(MAP.topol.lattice,MAP.topol.msize,ccode);
|
wolffd@0
|
1363
|
wolffd@0
|
1364 %msgbox('Save map in workspace. Load it from there.');
|
wolffd@0
|
1365 %som_gui('save_workspace');
|
wolffd@0
|
1366 %som_comp_vis;
|
wolffd@0
|
1367
|
wolffd@0
|
1368 %%%%%%%%%%%%%%%%
|
wolffd@0
|
1369
|
wolffd@0
|
1370
|
wolffd@0
|
1371 function [] = clear_all()
|
wolffd@0
|
1372
|
wolffd@0
|
1373 Handle = findobj(gcbf,'Enable','off');
|
wolffd@0
|
1374 set(Handle,'Enable','on');
|
wolffd@0
|
1375 Handle = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
1376 set(Handle,'Value',0);
|
wolffd@0
|
1377 Handle = findobj(gcbf,'Tag','StaticText10');
|
wolffd@0
|
1378 set(Handle,'String','Status <no action>');
|
wolffd@0
|
1379 Handle = findobj(gcbf,'Tag','StaticText3');
|
wolffd@0
|
1380 set(Handle,'String','Map: <empty>');
|
wolffd@0
|
1381 Handle = findobj(gcbf,'Tag','StaticText4');
|
wolffd@0
|
1382 set(Handle,'String','Data: <empty>');
|
wolffd@0
|
1383 Handle = findobj(gcbf,'Tag','StaticText20');
|
wolffd@0
|
1384 set(Handle,'String','lattice:');
|
wolffd@0
|
1385 Handle = findobj(gcbf,'Tag','StaticText11');
|
wolffd@0
|
1386 set(Handle,'String','neigh:');
|
wolffd@0
|
1387 Handle = findobj(gcbf,'Tag','StaticText16');
|
wolffd@0
|
1388 set(Handle,'String','training length:');
|
wolffd@0
|
1389 Handle = findobj(gcbf,'Tag','StaticText23');
|
wolffd@0
|
1390 set(Handle,'String','training length:');
|
wolffd@0
|
1391 Handle = findobj(gcbf,'Tag','StaticText17');
|
wolffd@0
|
1392 set(Handle,'String','radius initial:');
|
wolffd@0
|
1393 Handle = findobj(gcbf,'Tag','StaticText24');
|
wolffd@0
|
1394 set(Handle,'String','radius initial:');
|
wolffd@0
|
1395 Handle = findobj(gcbf,'Tag','StaticText5');
|
wolffd@0
|
1396 set(Handle,'String','map size:');
|
wolffd@0
|
1397 Handle = findobj(gcbf,'Tag','StaticText21');
|
wolffd@0
|
1398 set(Handle,'String','shape:');
|
wolffd@0
|
1399 Handle = findobj(gcbf,'Tag','StaticText12');
|
wolffd@0
|
1400 set(Handle,'String','order:');
|
wolffd@0
|
1401 set(Handle,'Visible','off');
|
wolffd@0
|
1402 Handle = findobj(gcbf,'Tag','StaticText14');
|
wolffd@0
|
1403 set(Handle,'String','length type:');
|
wolffd@0
|
1404 set(Handle,'Visible','off');
|
wolffd@0
|
1405 Handle = findobj(gcbf,'Tag','StaticText22');
|
wolffd@0
|
1406 set(Handle,'String','radius final:');
|
wolffd@0
|
1407 Handle = findobj(gcbf,'Tag','StaticText25');
|
wolffd@0
|
1408 set(Handle,'String','radius final:');
|
wolffd@0
|
1409 Handle = findobj(gcbf,'Tag','StaticText19');
|
wolffd@0
|
1410 set(Handle,'String','tracking:');
|
wolffd@0
|
1411 Handle = findobj(gcbf,'Tag','StaticText7');
|
wolffd@0
|
1412 set(Handle,'String','Initialization');
|
wolffd@0
|
1413 Handle = findobj(gcbf,'Tag','StaticText28');
|
wolffd@0
|
1414 set(Handle,'String','alpha type:');
|
wolffd@0
|
1415 set(Handle,'Visible','off');
|
wolffd@0
|
1416 Handle = findobj(gcbf,'Tag','StaticText26');
|
wolffd@0
|
1417 set(Handle,'String','alpha initial:');
|
wolffd@0
|
1418 Handle = findobj(gcbf,'Tag','StaticText27');
|
wolffd@0
|
1419 set(Handle,'String','alpha initial:');
|
wolffd@0
|
1420 Handle = findobj(gcbf,'Tag','StaticText6');
|
wolffd@0
|
1421 set(Handle,'String','type:');
|
wolffd@0
|
1422 Handle = findobj(gcbf,'Tag','StaticText9');
|
wolffd@0
|
1423 set(Handle,'String','training type:');
|
wolffd@0
|
1424 Handle = findobj(gcbf,'Tag','Pushbutton9');
|
wolffd@0
|
1425 set(Handle,'Enable','off');
|
wolffd@0
|
1426 Handle = findobj(gcbf,'Tag','Pushbutton6');
|
wolffd@0
|
1427 set(Handle,'Enable','off');
|
wolffd@0
|
1428 Handle = findobj(gcbf,'Tag','Pushbutton4');
|
wolffd@0
|
1429 set(Handle,'Enable','off');
|
wolffd@0
|
1430 Handle = findobj(gcbf,'Tag','Pushbutton5');
|
wolffd@0
|
1431 set(Handle,'Enable','off');
|
wolffd@0
|
1432 Handle = findobj(gcbf,'Tag','Pushbutton2');
|
wolffd@0
|
1433 set(Handle,'Enable','on');
|
wolffd@0
|
1434 Handle = findobj(gcbf,'Tag','Radiobutton1');
|
wolffd@0
|
1435 set(Handle,'Enable','off');
|
wolffd@0
|
1436 Handle = findobj(gcbf,'Tag','Load/SaveSave mapuimenu1');
|
wolffd@0
|
1437 set(Handle,'Enable','off');
|
wolffd@0
|
1438 Handle = findobj(gcbf,'Tag','&Load/SaveSave mapSave in workspaceuimenu1');
|
wolffd@0
|
1439 set(Handle,'Enable','off');
|
wolffd@0
|
1440 Handle = findobj(gcbf,'Tag','Subuimenu2');
|
wolffd@0
|
1441 set(Handle,'Enable','off');
|
wolffd@0
|
1442 Handle = findobj(gcbf,'Tag','&ToolsSubuimenu1');
|
wolffd@0
|
1443 set(Handle,'Enable','off');
|
wolffd@0
|
1444 Handle = findobj(gcbf,'Tag','&Help/InfoHelp windowuimenu1');
|
wolffd@0
|
1445 set(Handle,'Enable','off');
|
wolffd@0
|
1446 Handle = findobj(gcbf,'Tag','&Help/InfoData infouimenu1');
|
wolffd@0
|
1447 set(Handle,'Enable','off');
|
wolffd@0
|
1448 Handle = findobj(gcbf,'Tag','&Init&Trainuimenu1');
|
wolffd@0
|
1449 set(Handle,'Enable','off');
|
wolffd@0
|
1450 Handle = findobj(gcbf,'Tag','&Init&TrainInitialize1');
|
wolffd@0
|
1451 set(Handle,'Enable','off');
|
wolffd@0
|
1452 Handle = findobj(gcbf,'Tag','&Init&TrainChange initialization valuesuimenu1');
|
wolffd@0
|
1453 set(Handle,'Enable','off');
|
wolffd@0
|
1454 Handle = findobj(gcbf,'Tag','&Init&TrainTrain1');
|
wolffd@0
|
1455 set(Handle,'Enable','off');
|
wolffd@0
|
1456 Handle = findobj(gcbf,'Tag','Load/SaveSubuimenu1');
|
wolffd@0
|
1457 set(Handle,'Enable','off');
|
wolffd@0
|
1458 Handle = findobj(gcbf,'String','alpha initial:');
|
wolffd@0
|
1459 set(Handle,'Visible','off');
|
wolffd@0
|
1460 clear;
|
wolffd@0
|
1461 clear global;
|
wolffd@0
|
1462
|
wolffd@0
|
1463
|
wolffd@0
|
1464 function [] = close_fig()
|
wolffd@0
|
1465 global MAPSAVED NEWMAP;
|
wolffd@0
|
1466 if isempty(MAPSAVED)
|
wolffd@0
|
1467 if not(isempty(NEWMAP))
|
wolffd@0
|
1468 quest = 'Save map before closing?';
|
wolffd@0
|
1469 ButtonName = questdlg(quest);
|
wolffd@0
|
1470 switch ButtonName
|
wolffd@0
|
1471 case 'Yes'
|
wolffd@0
|
1472 som_gui('savemap');
|
wolffd@0
|
1473 som_gui('clear');
|
wolffd@0
|
1474 clear global;
|
wolffd@0
|
1475 close(gcbf);
|
wolffd@0
|
1476 case 'No'
|
wolffd@0
|
1477 som_gui('clear');
|
wolffd@0
|
1478 clear global;
|
wolffd@0
|
1479 close(gcbf);
|
wolffd@0
|
1480 case 'Cancel'
|
wolffd@0
|
1481 end
|
wolffd@0
|
1482 else
|
wolffd@0
|
1483 som_gui('clear');
|
wolffd@0
|
1484 clear global;
|
wolffd@0
|
1485 close(gcbf);
|
wolffd@0
|
1486 end
|
wolffd@0
|
1487 else
|
wolffd@0
|
1488 som_gui('clear');
|
wolffd@0
|
1489 clear global;
|
wolffd@0
|
1490 close(gcbf);
|
wolffd@0
|
1491 end
|
wolffd@0
|
1492
|
wolffd@0
|
1493
|
wolffd@0
|
1494 function [] = preprocess_gui()
|
wolffd@0
|
1495 global DATA;
|
wolffd@0
|
1496 if isempty(DATA)
|
wolffd@0
|
1497 helpmsg = {'Load data before tryinig to preprocess!'};
|
wolffd@0
|
1498 helpdlg(helpmsg,'Empty Data!');
|
wolffd@0
|
1499 return;
|
wolffd@0
|
1500 end
|
wolffd@0
|
1501 preprocess(DATA);
|
wolffd@0
|
1502 waitfor(gcf);
|
wolffd@0
|
1503 prompt = {'Name of preprocessed data in workspace?'};
|
wolffd@0
|
1504 tittle = 'Reload preprocessed data!';
|
wolffd@0
|
1505 lineNo = 1;
|
wolffd@0
|
1506 def = {DATA.name};
|
wolffd@0
|
1507 answer = inputdlg(prompt,tittle,lineNo,def);
|
wolffd@0
|
1508 if isempty(answer)
|
wolffd@0
|
1509 return;
|
wolffd@0
|
1510 end
|
wolffd@0
|
1511 data = answer{1};
|
wolffd@0
|
1512 new_name = retname;
|
wolffd@0
|
1513 assignin('base',new_name,data);
|
wolffd@0
|
1514 str = ['exist(' new_name ')'];
|
wolffd@0
|
1515 temp = evalin('base',str);
|
wolffd@0
|
1516 if temp ~= 1
|
wolffd@0
|
1517 temp = strcat('Variable ''',data,''' doesn''t exist in workspace.',...
|
wolffd@0
|
1518 'Old Data which is not preprocessed will be used.');
|
wolffd@0
|
1519 errordlg(temp,'Unknown variable!');
|
wolffd@0
|
1520 return;
|
wolffd@0
|
1521 end
|
wolffd@0
|
1522 evalin('base',['clear ' new_name ])
|
wolffd@0
|
1523 Handle = findobj(gcf,'Tag','StaticText4');
|
wolffd@0
|
1524 temp = strcat('Data: <',data,'>');
|
wolffd@0
|
1525 set(Handle,'String',temp);
|
wolffd@0
|
1526 Handle = findobj(gcf,'Tag','StaticText10');
|
wolffd@0
|
1527 set(Handle,'String','Status <data preprocessed>');
|
wolffd@0
|
1528 temp = evalin('base',data);
|
wolffd@0
|
1529 DATA.data = temp;
|
wolffd@0
|
1530 som_gui('def_initialization');
|
wolffd@0
|
1531
|
wolffd@0
|
1532
|
wolffd@0
|
1533 function [val] = loop(cell_data, search_data)
|
wolffd@0
|
1534 for val = 1: length(cell_data)
|
wolffd@0
|
1535 if strcmp(cell_data{val},search_data)
|
wolffd@0
|
1536 break;
|
wolffd@0
|
1537 end
|
wolffd@0
|
1538 end
|
wolffd@0
|
1539 if not(strcmp(cell_data{val},search_data))
|
wolffd@0
|
1540 val = -1;
|
wolffd@0
|
1541 end
|
wolffd@0
|
1542
|
wolffd@0
|
1543
|
wolffd@0
|
1544 function [] = comp_names(names,fid)
|
wolffd@0
|
1545 last = size(names);
|
wolffd@0
|
1546 for index=1:last
|
wolffd@0
|
1547 fprintf(fid,'%% %s\n',names{index})
|
wolffd@0
|
1548 end
|
wolffd@0
|
1549
|
wolffd@0
|
1550 function [] = fill_field(names,mask,fid)
|
wolffd@0
|
1551 last = size(mask);
|
wolffd@0
|
1552 for index=1:last
|
wolffd@0
|
1553 num = num2str(mask(index))
|
wolffd@0
|
1554 fprintf(fid,'%% %-15s %-2s\n',names{index},num)
|
wolffd@0
|
1555 end
|
wolffd@0
|
1556
|
wolffd@0
|
1557
|
wolffd@0
|
1558 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1559 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1560 %%%%%%%%%%%%%%%%% END OF OTHER FUNC %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1561 %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1562 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
1563
|
wolffd@0
|
1564
|
wolffd@0
|
1565
|
wolffd@0
|
1566
|
wolffd@0
|
1567 function fig = main_gui()
|
wolffd@0
|
1568
|
wolffd@0
|
1569 v = version;
|
wolffd@0
|
1570 ver_53_or_newer = (str2num(v(1:3)) >= 5.3);
|
wolffd@0
|
1571
|
wolffd@0
|
1572 h0 = figure('Units','normalized', ...
|
wolffd@0
|
1573 'Color',[0.85 0.85 0.85], ...
|
wolffd@0
|
1574 'Name','SOM Toolbox -- Initialization & Training', ...
|
wolffd@0
|
1575 'NumberTitle','off', ...
|
wolffd@0
|
1576 'PaperPosition',[18 180 576 432], ...
|
wolffd@0
|
1577 'PaperUnits','points', ...
|
wolffd@0
|
1578 'Position',[0.3296875 0.28125 0.3828125 0.576171875], ...
|
wolffd@0
|
1579 'Tag','Fig1');
|
wolffd@0
|
1580 if ver_53_or_newer, set(h0,'ToolBar','none'); end
|
wolffd@0
|
1581
|
wolffd@0
|
1582 h1 = uimenu('Parent',h0, ...
|
wolffd@0
|
1583 'Label','&Load/Save', ...
|
wolffd@0
|
1584 'Tag','uimenu1');
|
wolffd@0
|
1585 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1586 'Callback','som_gui(''load_data'');',...
|
wolffd@0
|
1587 'Label','Load Data', ...
|
wolffd@0
|
1588 'Tag','Subuimenu1');
|
wolffd@0
|
1589 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1590 'Label','Save map', ...
|
wolffd@0
|
1591 'Enable','off',...
|
wolffd@0
|
1592 'Tag','Load/SaveSubuimenu1');
|
wolffd@0
|
1593 h3 = uimenu('Parent',h2, ...
|
wolffd@0
|
1594 'Callback','som_gui(''save_workspace'');', ...
|
wolffd@0
|
1595 'Enable','off', ...
|
wolffd@0
|
1596 'Label','Save in workspace', ...
|
wolffd@0
|
1597 'Tag','Load/SaveSave mapuimenu1');
|
wolffd@0
|
1598 h3 = uimenu('Parent',h2, ...
|
wolffd@0
|
1599 'Callback','som_gui(''savemap'');', ...
|
wolffd@0
|
1600 'Enable','off', ...
|
wolffd@0
|
1601 'Label','Write cod-file', ...
|
wolffd@0
|
1602 'Tag','&Load/SaveSave mapSave in workspaceuimenu1');
|
wolffd@0
|
1603 h1 = uimenu('Parent',h0, ...
|
wolffd@0
|
1604 'Label','&Utilities', ...
|
wolffd@0
|
1605 'Tag','uimenu2');
|
wolffd@0
|
1606 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1607 'Callback','som_gui(''preprocess'');', ...
|
wolffd@0
|
1608 'Enable','off', ...
|
wolffd@0
|
1609 'Label','Preprocess Data', ...
|
wolffd@0
|
1610 'Tag','Subuimenu2');
|
wolffd@0
|
1611 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1612 'Callback','som_gui(''visualize'');', ...
|
wolffd@0
|
1613 'Enable','off', ...
|
wolffd@0
|
1614 'Label','Visualize Map', ...
|
wolffd@0
|
1615 'Tag','&ToolsSubuimenu1');
|
wolffd@0
|
1616 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1617 'Callback','som_gui(''clear_all'');', ...
|
wolffd@0
|
1618 'Label','Clear all', ...
|
wolffd@0
|
1619 'Tag','&ToolsSubuimenu2');
|
wolffd@0
|
1620 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1621 'Callback','som_gui(''close'');', ...
|
wolffd@0
|
1622 'Label','Close Figure', ...
|
wolffd@0
|
1623 'Tag','&ToolsClear alluimenu1');
|
wolffd@0
|
1624 h1 = uimenu('Parent',h0, ...
|
wolffd@0
|
1625 'Label','&Info', ...
|
wolffd@0
|
1626 'Tag','&ToolsClose Figureuimenu1');
|
wolffd@0
|
1627 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1628 'Callback','som_gui(''help'');', ...
|
wolffd@0
|
1629 'Label','WWW Help', ...
|
wolffd@0
|
1630 'Tag','Helpuimenu1');
|
wolffd@0
|
1631 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1632 'Callback','som_gui(''helpwin'');', ...
|
wolffd@0
|
1633 'Label','Help window', ...
|
wolffd@0
|
1634 'Tag','Helpuimenu2');
|
wolffd@0
|
1635 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1636 'Callback','som_gui(''helpwin2'');', ...
|
wolffd@0
|
1637 'Label','About GUI', ...
|
wolffd@0
|
1638 'Tag','&Help/InfoHelp windowuimenu2');
|
wolffd@0
|
1639 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1640 'Callback','som_gui(''data_info'');', ...
|
wolffd@0
|
1641 'Enable','off', ...
|
wolffd@0
|
1642 'Label','Data info', ...
|
wolffd@0
|
1643 'Tag','&Help/InfoHelp windowuimenu1');
|
wolffd@0
|
1644 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1645 'Callback','som_gui(''map_info'');', ...
|
wolffd@0
|
1646 'Enable','off', ...
|
wolffd@0
|
1647 'Label','Map info', ...
|
wolffd@0
|
1648 'Tag','&Help/InfoData infouimenu1');
|
wolffd@0
|
1649 h1 = uimenu('Parent',h0, ...
|
wolffd@0
|
1650 'Label','&Init/Train', ...
|
wolffd@0
|
1651 'Tag','&Init/Train1');
|
wolffd@0
|
1652 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1653 'Callback','som_gui(''change_initialization'');', ...
|
wolffd@0
|
1654 'Enable','off', ...
|
wolffd@0
|
1655 'Label','Change initialization values', ...
|
wolffd@0
|
1656 'Tag','&Init&Trainuimenu1');
|
wolffd@0
|
1657 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1658 'Callback','som_gui(''init'');', ...
|
wolffd@0
|
1659 'Enable','off', ...
|
wolffd@0
|
1660 'Label','Initialize', ...
|
wolffd@0
|
1661 'Tag','&Init&TrainInitialize1');
|
wolffd@0
|
1662 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1663 'Callback','som_gui(''change_def'');', ...
|
wolffd@0
|
1664 'Enable','off', ...
|
wolffd@0
|
1665 'Label','Change training values', ...
|
wolffd@0
|
1666 'Tag','&Init&TrainChange initialization valuesuimenu1');
|
wolffd@0
|
1667 h2 = uimenu('Parent',h1, ...
|
wolffd@0
|
1668 'Callback','som_gui(''def_train'');', ...
|
wolffd@0
|
1669 'Enable','off', ...
|
wolffd@0
|
1670 'Label','Train', ...
|
wolffd@0
|
1671 'Tag','&Init&TrainTrain1');
|
wolffd@0
|
1672 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1673 'Units','normalized', ...
|
wolffd@0
|
1674 'ListboxTop',0, ...
|
wolffd@0
|
1675 'Position',[0.04081632653061224 0.01129943502824859 0.7619047619047619 0.9717514124293786], ...
|
wolffd@0
|
1676 'Style','frame', ...
|
wolffd@0
|
1677 'Tag','Frame1');
|
wolffd@0
|
1678 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1679 'Units','normalized', ...
|
wolffd@0
|
1680 'ListboxTop',0, ...
|
wolffd@0
|
1681 'Position',[0.06802721088435373 0.7909604519774012 0.7074829931972788 0.1807909604519774], ...
|
wolffd@0
|
1682 'Style','frame', ...
|
wolffd@0
|
1683 'Tag','Frame2');
|
wolffd@0
|
1684 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1685 'Units','normalized', ...
|
wolffd@0
|
1686 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1687 'HorizontalAlignment','left', ...
|
wolffd@0
|
1688 'ListboxTop',0, ...
|
wolffd@0
|
1689 'Position',[0.09523809523809523 0.8527570621468927 0.6530612244897959 0.03389830508474576], ...
|
wolffd@0
|
1690 'FontUnits','normalized',...
|
wolffd@0
|
1691 'String','Map <empty>', ...
|
wolffd@0
|
1692 'Style','text', ...
|
wolffd@0
|
1693 'Tag','StaticText3');
|
wolffd@0
|
1694 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1695 'Units','normalized', ...
|
wolffd@0
|
1696 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1697 'HorizontalAlignment','left', ...
|
wolffd@0
|
1698 'ListboxTop',0, ...
|
wolffd@0
|
1699 'Position',[0.09523809523809523 0.8075593220338984 0.6530612244897959 0.03389830508474576], ...
|
wolffd@0
|
1700 'String','Data <empty>', ...
|
wolffd@0
|
1701 'FontUnits','normalized',...
|
wolffd@0
|
1702 'Style','text', ...
|
wolffd@0
|
1703 'Tag','StaticText4');
|
wolffd@0
|
1704 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1705 'Units','normalized', ...
|
wolffd@0
|
1706 'ListboxTop',0, ...
|
wolffd@0
|
1707 'Position',[0.06802721088435373 0.5988700564971752 0.7074829931972788 0.1694915254237288], ...
|
wolffd@0
|
1708 'Style','frame', ...
|
wolffd@0
|
1709 'Tag','Frame3');
|
wolffd@0
|
1710 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1711 'Units','normalized', ...
|
wolffd@0
|
1712 'ListboxTop',0, ...
|
wolffd@0
|
1713 'Position',[0.1041 0.7356 0.6286 0.0271], ...
|
wolffd@0
|
1714 'String','Initialization', ...
|
wolffd@0
|
1715 'FontUnits','normalized',...
|
wolffd@0
|
1716 'Style','text', ...
|
wolffd@0
|
1717 'FontWeight','bold', ...
|
wolffd@0
|
1718 'Tag','StaticText7');
|
wolffd@0
|
1719 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1720 'Units','normalized', ...
|
wolffd@0
|
1721 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1722 'HorizontalAlignment','left', ...
|
wolffd@0
|
1723 'ListboxTop',0, ...
|
wolffd@0
|
1724 'Position',[0.4489795918367346 0.7005649717514124 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1725 'String','map size:', ...
|
wolffd@0
|
1726 'FontUnits','normalized',...
|
wolffd@0
|
1727 'Style','text', ...
|
wolffd@0
|
1728 'Tag','StaticText5');
|
wolffd@0
|
1729 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1730 'Units','normalized', ...
|
wolffd@0
|
1731 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1732 'HorizontalAlignment','left', ...
|
wolffd@0
|
1733 'ListboxTop',0, ...
|
wolffd@0
|
1734 'Position',[0.09523809523809523 0.6553672316384182 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1735 'String','lattice:', ...
|
wolffd@0
|
1736 'FontUnits','normalized',...
|
wolffd@0
|
1737 'Style','text', ...
|
wolffd@0
|
1738 'Tag','StaticText20');
|
wolffd@0
|
1739 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1740 'Units','normalized', ...
|
wolffd@0
|
1741 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1742 'HorizontalAlignment','left', ...
|
wolffd@0
|
1743 'ListboxTop',0, ...
|
wolffd@0
|
1744 'Position',[0.09523809523809523 0.7000000000000001 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1745 'String','type:', ...
|
wolffd@0
|
1746 'FontUnits','normalized',...
|
wolffd@0
|
1747 'Style','text', ...
|
wolffd@0
|
1748 'Tag','StaticText6');
|
wolffd@0
|
1749 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1750 'Units','normalized', ...
|
wolffd@0
|
1751 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1752 'HorizontalAlignment','left', ...
|
wolffd@0
|
1753 'ListboxTop',0, ...
|
wolffd@0
|
1754 'Position',[0.4489795918367346 0.6553672316384182 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1755 'String','shape:', ...
|
wolffd@0
|
1756 'FontUnits','normalized',...
|
wolffd@0
|
1757 'Style','text', ...
|
wolffd@0
|
1758 'Tag','StaticText21');
|
wolffd@0
|
1759 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1760 'Units','normalized', ...
|
wolffd@0
|
1761 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
|
wolffd@0
|
1762 'ListboxTop',0, ...
|
wolffd@0
|
1763 'Position',[0.3129251700680272 0.6101694915254238 0.217687074829932 0.03389830508474576], ...
|
wolffd@0
|
1764 'String','Change values', ...
|
wolffd@0
|
1765 'FontUnits','normalized',...
|
wolffd@0
|
1766 'Callback','som_gui(''change_initialization'');', ...
|
wolffd@0
|
1767 'Enable','off', ...
|
wolffd@0
|
1768 'Tag','Pushbutton9');
|
wolffd@0
|
1769 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1770 'Units','normalized', ...
|
wolffd@0
|
1771 'ListboxTop',0, ...
|
wolffd@0
|
1772 'Position',[0.06802721088435373 0.02259887005649718 0.7074829931972788 0.5536723163841808], ...
|
wolffd@0
|
1773 'Style','frame', ...
|
wolffd@0
|
1774 'Tag','Frame4');
|
wolffd@0
|
1775 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1776 'Units','normalized', ...
|
wolffd@0
|
1777 'ListboxTop',0, ...
|
wolffd@0
|
1778 'Position',[0.1041 0.5316 0.6429 0.0339], ...
|
wolffd@0
|
1779 'String','Training', ...
|
wolffd@0
|
1780 'FontUnits','normalized',...
|
wolffd@0
|
1781 'Style','text', ...
|
wolffd@0
|
1782 'FontWeight','bold', ...
|
wolffd@0
|
1783 'Tag','StaticText8');
|
wolffd@0
|
1784 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1785 'Units','normalized', ...
|
wolffd@0
|
1786 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1787 'ListboxTop',0, ...
|
wolffd@0
|
1788 'Position',[0.09523809523809523 0.4971751412429379 0.6530612244897959 0.03389830508474576], ...
|
wolffd@0
|
1789 'String','training type', ...
|
wolffd@0
|
1790 'FontUnits','normalized',...
|
wolffd@0
|
1791 'Style','text', ...
|
wolffd@0
|
1792 'Tag','StaticText9');
|
wolffd@0
|
1793 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1794 'Units','normalized', ...
|
wolffd@0
|
1795 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1796 'HorizontalAlignment','left', ...
|
wolffd@0
|
1797 'ListboxTop',0, ...
|
wolffd@0
|
1798 'Position',[0.4489795918367346 0.4519774011299435 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1799 'String','tracking:', ...
|
wolffd@0
|
1800 'FontUnits','normalized',...
|
wolffd@0
|
1801 'Style','text', ...
|
wolffd@0
|
1802 'Tag','StaticText19');
|
wolffd@0
|
1803 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1804 'Units','normalized', ...
|
wolffd@0
|
1805 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1806 'HorizontalAlignment','left', ...
|
wolffd@0
|
1807 'ListboxTop',0, ...
|
wolffd@0
|
1808 'Position',[0.09523809523809523 0.4519774011299435 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1809 'String','neigh:', ...
|
wolffd@0
|
1810 'FontUnits','normalized',...
|
wolffd@0
|
1811 'Style','text', ...
|
wolffd@0
|
1812 'Tag','StaticText11');
|
wolffd@0
|
1813 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1814 'Units','normalized', ...
|
wolffd@0
|
1815 'HorizontalAlignment','left', ...
|
wolffd@0
|
1816 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1817 'ListboxTop',0, ...
|
wolffd@0
|
1818 'Position',[0.09523809523809523 0.36519774011299435 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1819 'String','alpha type:', ...
|
wolffd@0
|
1820 'FontUnits','normalized',...
|
wolffd@0
|
1821 'Style','text', ...
|
wolffd@0
|
1822 'Visible','off',...
|
wolffd@0
|
1823 'Tag','StaticText28');
|
wolffd@0
|
1824 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1825 'Units','normalized', ...
|
wolffd@0
|
1826 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1827 'ListboxTop',0, ...
|
wolffd@0
|
1828 'HorizontalAlignment','left', ...
|
wolffd@0
|
1829 'Position',[0.09523809523809523 0.4067796610169492 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1830 'String','length type:', ...
|
wolffd@0
|
1831 'FontUnits','normalized',...
|
wolffd@0
|
1832 'Style','text', ...
|
wolffd@0
|
1833 'Visible','off',...
|
wolffd@0
|
1834 'Tag','StaticText14');
|
wolffd@0
|
1835 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1836 'Units','normalized', ...
|
wolffd@0
|
1837 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1838 'HorizontalAlignment','left', ...
|
wolffd@0
|
1839 'ListboxTop',0, ...
|
wolffd@0
|
1840 'Position',[0.4489795918367346 0.4067796610169492 0.2993197278911565 0.03389830508474576], ...
|
wolffd@0
|
1841 'String','order:', ...
|
wolffd@0
|
1842 'FontUnits','normalized',...
|
wolffd@0
|
1843 'Style','text', ...
|
wolffd@0
|
1844 'Visible','off',...
|
wolffd@0
|
1845 'Tag','StaticText12');
|
wolffd@0
|
1846 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1847 'Units','normalized', ...
|
wolffd@0
|
1848 'ListboxTop',0, ...
|
wolffd@0
|
1849 'Position',[0.09523809523809523 0.07909604519774012 0.2993197278911565 0.2711864406779661], ...
|
wolffd@0
|
1850 'Style','frame', ...
|
wolffd@0
|
1851 'Tag','Frame5');
|
wolffd@0
|
1852 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1853 'Units','normalized', ...
|
wolffd@0
|
1854 'ListboxTop',0, ...
|
wolffd@0
|
1855 'Position',[0.4353741496598639 0.07909604519774012 0.2993197278911565 0.2711864406779661], ...
|
wolffd@0
|
1856 'Style','frame', ...
|
wolffd@0
|
1857 'Tag','Frame6');
|
wolffd@0
|
1858 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1859 'Units','normalized', ...
|
wolffd@0
|
1860 'ListboxTop',0, ...
|
wolffd@0
|
1861 'Position',[0.108843537414966 0.3050847457627119 0.2721088435374149 0.03389830508474576], ...
|
wolffd@0
|
1862 'String','Rough', ...
|
wolffd@0
|
1863 'FontUnits','normalized',...
|
wolffd@0
|
1864 'Style','text', ...
|
wolffd@0
|
1865 'Tag','StaticText13');
|
wolffd@0
|
1866 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1867 'Units','normalized', ...
|
wolffd@0
|
1868 'ListboxTop',0, ...
|
wolffd@0
|
1869 'Position',[0.4489795918367346 0.3050847457627119 0.2721088435374149 0.03389830508474576], ...
|
wolffd@0
|
1870 'String','Finetune', ...
|
wolffd@0
|
1871 'FontUnits','normalized',...
|
wolffd@0
|
1872 'Style','text', ...
|
wolffd@0
|
1873 'Tag','StaticText15');
|
wolffd@0
|
1874 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1875 'Units','normalized', ...
|
wolffd@0
|
1876 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1877 'HorizontalAlignment','left', ...
|
wolffd@0
|
1878 'ListboxTop',0, ...
|
wolffd@0
|
1879 'Position',[0.108843537414966 0.1807909604519774 0.2721088435374149 0.03389830508474576], ...
|
wolffd@0
|
1880 'String','training length:', ...
|
wolffd@0
|
1881 'FontUnits','normalized',...
|
wolffd@0
|
1882 'Style','text', ...
|
wolffd@0
|
1883 'Tag','StaticText16');
|
wolffd@0
|
1884 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1885 'Units','normalized', ...
|
wolffd@0
|
1886 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1887 'HorizontalAlignment','left', ...
|
wolffd@0
|
1888 'ListboxTop',0, ...
|
wolffd@0
|
1889 'Position',[0.108843537414966 0.2694915254237288 0.2714285714285714 0.03389830508474576], ...
|
wolffd@0
|
1890 'String','radius initial:', ...
|
wolffd@0
|
1891 'FontUnits','normalized',...
|
wolffd@0
|
1892 'Style','text', ...
|
wolffd@0
|
1893 'Tag','StaticText17');
|
wolffd@0
|
1894 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1895 'Units','normalized', ...
|
wolffd@0
|
1896 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1897 'HorizontalAlignment','left', ...
|
wolffd@0
|
1898 'ListboxTop',0, ...
|
wolffd@0
|
1899 'Position',[0.1088 0.2260 0.2721 0.0339], ...
|
wolffd@0
|
1900 'String','radius final:', ...
|
wolffd@0
|
1901 'FontUnits','normalized',...
|
wolffd@0
|
1902 'Style','text', ...
|
wolffd@0
|
1903 'Tag','StaticText22');
|
wolffd@0
|
1904 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1905 'Units','normalized', ...
|
wolffd@0
|
1906 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1907 'ListboxTop',0, ...
|
wolffd@0
|
1908 'Position',[0.108843537414966 0.13694915254237288 0.2714285714285714 0.03389830508474576], ...
|
wolffd@0
|
1909 'String','alpha initial:', ...
|
wolffd@0
|
1910 'FontUnits','normalized',...
|
wolffd@0
|
1911 'HorizontalAlignment','left', ...
|
wolffd@0
|
1912 'Style','text', ...
|
wolffd@0
|
1913 'Visible','off',...
|
wolffd@0
|
1914 'Tag','StaticText26');
|
wolffd@0
|
1915 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1916 'Units','normalized', ...
|
wolffd@0
|
1917 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1918 'HorizontalAlignment','left', ...
|
wolffd@0
|
1919 'ListboxTop',0, ...
|
wolffd@0
|
1920 'Position',[0.4489795918367346 0.1807909604519774 0.2721088435374149 0.03389830508474576], ...
|
wolffd@0
|
1921 'String','training length:', ...
|
wolffd@0
|
1922 'FontUnits','normalized',...
|
wolffd@0
|
1923 'Style','text', ...
|
wolffd@0
|
1924 'Tag','StaticText23');
|
wolffd@0
|
1925 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1926 'Units','normalized', ...
|
wolffd@0
|
1927 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1928 'HorizontalAlignment','left', ...
|
wolffd@0
|
1929 'ListboxTop',0, ...
|
wolffd@0
|
1930 'Position',[0.4489795918367346 0.2711864406779661 0.2721088435374149 0.03389830508474576], ...
|
wolffd@0
|
1931 'String','radius initial:', ...
|
wolffd@0
|
1932 'FontUnits','normalized',...
|
wolffd@0
|
1933 'Style','text', ...
|
wolffd@0
|
1934 'Tag','StaticText24');
|
wolffd@0
|
1935 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1936 'Units','normalized', ...
|
wolffd@0
|
1937 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1938 'HorizontalAlignment','left', ...
|
wolffd@0
|
1939 'ListboxTop',0, ...
|
wolffd@0
|
1940 'Position',[0.4490 0.2260 0.2721 0.0339], ...
|
wolffd@0
|
1941 'String','radius final:', ...
|
wolffd@0
|
1942 'FontUnits','normalized',...
|
wolffd@0
|
1943 'Style','text', ...
|
wolffd@0
|
1944 'Tag','StaticText25');
|
wolffd@0
|
1945 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1946 'Units','normalized', ...
|
wolffd@0
|
1947 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
1948 'ListboxTop',0, ...
|
wolffd@0
|
1949 'Position',[0.4489795918367346 0.13694915254237288 0.2721088435374149 0.03389830508474576], ...
|
wolffd@0
|
1950 'String','alpha initial:', ...
|
wolffd@0
|
1951 'FontUnits','normalized',...
|
wolffd@0
|
1952 'HorizontalAlignment','left', ...
|
wolffd@0
|
1953 'Style','text', ...
|
wolffd@0
|
1954 'Visible','off',...
|
wolffd@0
|
1955 'Tag','StaticText27');
|
wolffd@0
|
1956 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1957 'Units','normalized', ...
|
wolffd@0
|
1958 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
|
wolffd@0
|
1959 'ListboxTop',0, ...
|
wolffd@0
|
1960 'Position',[0.3129251700680272 0.03389830508474576 0.217687074829932 0.03389830508474576], ...
|
wolffd@0
|
1961 'String','Change values', ...
|
wolffd@0
|
1962 'FontUnits','normalized',...
|
wolffd@0
|
1963 'Callback','som_gui(''change_def'');', ...
|
wolffd@0
|
1964 'Enable','off', ...
|
wolffd@0
|
1965 'Tag','Pushbutton6');
|
wolffd@0
|
1966 if ver_53_or_newer, set(h1,'TooltipString','Change default values in training.'); end
|
wolffd@0
|
1967
|
wolffd@0
|
1968 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1969 'Units','normalized', ...
|
wolffd@0
|
1970 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
|
wolffd@0
|
1971 'ListboxTop',0, ...
|
wolffd@0
|
1972 'Position',[0.8163265306122448 0.8152542372881356 0.163265306122449 0.05593220338983051], ...
|
wolffd@0
|
1973 'String','LOAD', ...
|
wolffd@0
|
1974 'FontUnits','normalized',...
|
wolffd@0
|
1975 'Callback','som_gui(''load_data'');', ...
|
wolffd@0
|
1976 'Tag','Pushbutton2');
|
wolffd@0
|
1977 if ver_53_or_newer, set(h1,'TooltipString','Load data file.'); end
|
wolffd@0
|
1978
|
wolffd@0
|
1979 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1980 'Units','normalized', ...
|
wolffd@0
|
1981 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
|
wolffd@0
|
1982 'ListboxTop',0, ...
|
wolffd@0
|
1983 'Position',[0.8163265306122448 0.6457627118644068 0.163265306122449 0.05593220338983051], ...
|
wolffd@0
|
1984 'String','INITIALIZE', ...
|
wolffd@0
|
1985 'FontUnits','normalized',...
|
wolffd@0
|
1986 'Callback','som_gui(''init'');', ...
|
wolffd@0
|
1987 'Enable','off', ...
|
wolffd@0
|
1988 'Tag','Pushbutton4');
|
wolffd@0
|
1989 if ver_53_or_newer, set(h1,'TooltipString','Initialize map.'); end
|
wolffd@0
|
1990
|
wolffd@0
|
1991 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
1992 'Units','normalized', ...
|
wolffd@0
|
1993 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
|
wolffd@0
|
1994 'ListboxTop',0, ...
|
wolffd@0
|
1995 'Position',[0.8163265306122448 0.384180790960452 0.163265306122449 0.05649717514124294], ...
|
wolffd@0
|
1996 'String','TRAIN', ...
|
wolffd@0
|
1997 'FontUnits','normalized',...
|
wolffd@0
|
1998 'Callback','som_gui(''def_train'');', ...
|
wolffd@0
|
1999 'Enable','off', ...
|
wolffd@0
|
2000 'Tag','Pushbutton5');
|
wolffd@0
|
2001 if ver_53_or_newer, set(h1,'TooltipString','Train map whit default values.'); end
|
wolffd@0
|
2002
|
wolffd@0
|
2003 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2004 'Units','normalized', ...
|
wolffd@0
|
2005 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
|
wolffd@0
|
2006 'ListboxTop',0, ...
|
wolffd@0
|
2007 'Position',[0.8163265306122448 0.06779661016949153 0.163265306122449 0.05649717514124294], ...
|
wolffd@0
|
2008 'Callback','som_gui(''close'');', ...
|
wolffd@0
|
2009 'String','CLOSE', ...
|
wolffd@0
|
2010 'FontUnits','normalized',...
|
wolffd@0
|
2011 'Tag','Pushbutton8');
|
wolffd@0
|
2012 if ver_53_or_newer, set(h1,'TooltipString','Close figure.'); end
|
wolffd@0
|
2013
|
wolffd@0
|
2014 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2015 'Units','normalized', ...
|
wolffd@0
|
2016 'BackgroundColor',[0.9 0.9 0.9], ...
|
wolffd@0
|
2017 'HorizontalAlignment','left', ...
|
wolffd@0
|
2018 'ListboxTop',0, ...
|
wolffd@0
|
2019 'Position',[0.09387755102040815 0.897954802259887 0.6530612244897959 0.03389830508474576], ...
|
wolffd@0
|
2020 'String','Status <no action>', ...
|
wolffd@0
|
2021 'FontUnits','normalized',...
|
wolffd@0
|
2022 'Style','text', ...
|
wolffd@0
|
2023 'Tag','StaticText10');
|
wolffd@0
|
2024 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2025 'Units','normalized', ...
|
wolffd@0
|
2026 'ListboxTop',0, ...
|
wolffd@0
|
2027 'Position',[0.108843537414966 0.0903954802259887 0.2721088435374149 0.03389830508474576], ...
|
wolffd@0
|
2028 'String','Only finetune', ...
|
wolffd@0
|
2029 'FontUnits','normalized',...
|
wolffd@0
|
2030 'Callback','som_gui(''only_finetune'');', ...
|
wolffd@0
|
2031 'Enable','off', ...
|
wolffd@0
|
2032 'Style','radiobutton', ...
|
wolffd@0
|
2033 'Tag','Radiobutton1');
|
wolffd@0
|
2034 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2035 'Units','normalized', ...
|
wolffd@0
|
2036 'ListboxTop',0, ...
|
wolffd@0
|
2037 'Position',[0.09523809523809523 0.9418531073446328 0.6530612244897959 0.0259887005649718], ...
|
wolffd@0
|
2038 'String','Information', ...
|
wolffd@0
|
2039 'FontUnits','normalized',...
|
wolffd@0
|
2040 'FontWeight','bold', ...
|
wolffd@0
|
2041 'Style','text', ...
|
wolffd@0
|
2042 'Tag','StaticText18');
|
wolffd@0
|
2043 if nargout > 0, fig = h0; end
|
wolffd@0
|
2044
|
wolffd@0
|
2045
|
wolffd@0
|
2046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
2047
|
wolffd@0
|
2048
|
wolffd@0
|
2049 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
2050
|
wolffd@0
|
2051 function fig = loadgui3()
|
wolffd@0
|
2052
|
wolffd@0
|
2053 temp = {'dat file';'mat file'};
|
wolffd@0
|
2054
|
wolffd@0
|
2055 h0 = figure('Units','normalized', ...
|
wolffd@0
|
2056 'Color',[0.8 0.8 0.8], ...
|
wolffd@0
|
2057 'Name','Load data!', ...
|
wolffd@0
|
2058 'NumberTitle','off', ...
|
wolffd@0
|
2059 'PaperType','a4letter', ...
|
wolffd@0
|
2060 'Position',[0.3828125 0.5 0.3421875 0.189453125], ...
|
wolffd@0
|
2061 'Tag','Fig1');
|
wolffd@0
|
2062
|
wolffd@0
|
2063 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2064 'Units','normalized', ...
|
wolffd@0
|
2065 'ListboxTop',0, ...
|
wolffd@0
|
2066 'Position',[0.02853881278538813 0.06443298969072164 0.7705479452054794 0.8698453608247422], ...
|
wolffd@0
|
2067 'Style','frame', ...
|
wolffd@0
|
2068 'Tag','Frame1');
|
wolffd@0
|
2069 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2070 'Units','normalized', ...
|
wolffd@0
|
2071 'ListboxTop',0, ...
|
wolffd@0
|
2072 'Position',[0.04337899543378995 0.547680412371134 0.7420091324200913 0.354381443298969], ...
|
wolffd@0
|
2073 'Style','frame', ...
|
wolffd@0
|
2074 'Tag','Frame2');
|
wolffd@0
|
2075 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2076 'Units','normalized', ...
|
wolffd@0
|
2077 'ListboxTop',0, ...
|
wolffd@0
|
2078 'Position',[0.04280821917808219 0.09664948453608246 0.7420091324200913 0.4188144329896907], ...
|
wolffd@0
|
2079 'Style','frame', ...
|
wolffd@0
|
2080 'Tag','Frame3');
|
wolffd@0
|
2081 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2082 'Units','normalized', ...
|
wolffd@0
|
2083 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2084 'FontWeight','bold', ...
|
wolffd@0
|
2085 'HorizontalAlignment','left', ...
|
wolffd@0
|
2086 'ListboxTop',0, ...
|
wolffd@0
|
2087 'Position',[0.05717762557077625 0.7881958762886597 0.2853881278538812 0.09664948453608246], ...
|
wolffd@0
|
2088 'String','From', ...
|
wolffd@0
|
2089 'FontUnits','normalized',...
|
wolffd@0
|
2090 'Style','text', ...
|
wolffd@0
|
2091 'Tag','StaticText1');
|
wolffd@0
|
2092 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2093 'Units','normalized', ...
|
wolffd@0
|
2094 'Callback','som_gui(''workspace'');', ...
|
wolffd@0
|
2095 'ListboxTop',0, ...
|
wolffd@0
|
2096 'Position',[0.05107762557077625 0.7087628865979381 0.1997716894977169 0.09664948453608246], ...
|
wolffd@0
|
2097 'String','Ws', ...
|
wolffd@0
|
2098 'FontUnits','normalized',...
|
wolffd@0
|
2099 'Style','radiobutton', ...
|
wolffd@0
|
2100 'Tag','Radiobutton2');
|
wolffd@0
|
2101 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2102 'Units','normalized', ...
|
wolffd@0
|
2103 'Callback','som_gui(''file'');', ...
|
wolffd@0
|
2104 'ListboxTop',0, ...
|
wolffd@0
|
2105 'Position',[0.05107762557077625 0.5773195876288659 0.2009132420091324 0.09793814432989689], ...
|
wolffd@0
|
2106 'String','File', ...
|
wolffd@0
|
2107 'FontUnits','normalized',...
|
wolffd@0
|
2108 'Style','radiobutton', ...
|
wolffd@0
|
2109 'Tag','Radiobutton1');
|
wolffd@0
|
2110 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2111 'Units','normalized', ...
|
wolffd@0
|
2112 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2113 'Callback','Handle = findobj(gcbf,''Tag'',''EditText2'');set(Handle,''String'','''');',...
|
wolffd@0
|
2114 'FontUnits','normalized',...
|
wolffd@0
|
2115 'HorizontalAlignment','left', ...
|
wolffd@0
|
2116 'ListboxTop',0, ...
|
wolffd@0
|
2117 'Position',[0.2893881278538812 0.7087628865979381 0.3139269406392694 0.09664948453608246], ...
|
wolffd@0
|
2118 'Style','edit', ...
|
wolffd@0
|
2119 'Tag','EditText1');
|
wolffd@0
|
2120 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2121 'Units','normalized', ...
|
wolffd@0
|
2122 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2123 'Callback','Handle = findobj(gcbf,''Tag'',''EditText1'');set(Handle,''String'','''');',...
|
wolffd@0
|
2124 'FontUnits','normalized',...
|
wolffd@0
|
2125 'HorizontalAlignment','left', ...
|
wolffd@0
|
2126 'ListboxTop',0, ...
|
wolffd@0
|
2127 'Position',[0.2893881278538812 0.5798969072164948 0.3139269406392694 0.09664948453608246], ...
|
wolffd@0
|
2128 'Style','edit', ...
|
wolffd@0
|
2129 'Tag','EditText2');
|
wolffd@0
|
2130 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2131 'Units','normalized', ...
|
wolffd@0
|
2132 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2133 'Callback','som_gui(''browse'');', ...
|
wolffd@0
|
2134 'ListboxTop',0, ...
|
wolffd@0
|
2135 'Position',[0.6279 0.5799 0.1427 0.2255], ...
|
wolffd@0
|
2136 'String','Browse', ...
|
wolffd@0
|
2137 'FontUnits','normalized',...
|
wolffd@0
|
2138 'Tag','Pushbutton1');
|
wolffd@0
|
2139 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2140 'Units','normalized', ...
|
wolffd@0
|
2141 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2142 'Callback','som_gui(''load_ok'');', ...
|
wolffd@0
|
2143 'ListboxTop',0, ...
|
wolffd@0
|
2144 'Position',[0.8276 0.5577 0.1427 0.2255], ...
|
wolffd@0
|
2145 'String','Load', ...
|
wolffd@0
|
2146 'FontUnits','normalized',...
|
wolffd@0
|
2147 'Tag','Pushbutton2');
|
wolffd@0
|
2148 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2149 'Units','normalized', ...
|
wolffd@0
|
2150 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2151 'Callback','close;',...
|
wolffd@0
|
2152 'ListboxTop',0, ...
|
wolffd@0
|
2153 'Position',[0.8276 0.2577 0.1427 0.2255], ...
|
wolffd@0
|
2154 'String','Cancel', ...
|
wolffd@0
|
2155 'FontUnits','normalized',...
|
wolffd@0
|
2156 'Tag','Pushbutton3');
|
wolffd@0
|
2157 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2158 'Units','normalized', ...
|
wolffd@0
|
2159 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2160 'Callback','som_gui(''file_select'');', ...
|
wolffd@0
|
2161 'ListboxTop',0, ...
|
wolffd@0
|
2162 'Max',2, ...
|
wolffd@0
|
2163 'Min',1, ...
|
wolffd@0
|
2164 'String',temp,...
|
wolffd@0
|
2165 'FontUnits','normalized',...
|
wolffd@0
|
2166 'Position',[0.3995433789954338 0.2977319587628866 0.1997716894977169 0.08664948453608246], ...
|
wolffd@0
|
2167 'Style','popupmenu', ...
|
wolffd@0
|
2168 'Tag','PopupMenu1', ...
|
wolffd@0
|
2169 'Value',1);
|
wolffd@0
|
2170 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2171 'Units','normalized', ...
|
wolffd@0
|
2172 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2173 'FontWeight','bold', ...
|
wolffd@0
|
2174 'HorizontalAlignment','left', ...
|
wolffd@0
|
2175 'ListboxTop',0, ...
|
wolffd@0
|
2176 'Position',[0.05707762557077625 0.3865979381443299 0.7134703196347032 0.09664948453608246], ...
|
wolffd@0
|
2177 'String','Parameters for file', ...
|
wolffd@0
|
2178 'FontUnits','normalized',...
|
wolffd@0
|
2179 'Style','text', ...
|
wolffd@0
|
2180 'Tag','StaticText2');
|
wolffd@0
|
2181 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2182 'Units','normalized', ...
|
wolffd@0
|
2183 'HorizontalAlignment','left', ...
|
wolffd@0
|
2184 'ListboxTop',0, ...
|
wolffd@0
|
2185 'Position',[0.05707762557077625 0.2777319587628866 0.2568493150684931 0.09664948453608246], ...
|
wolffd@0
|
2186 'String','File type ', ...
|
wolffd@0
|
2187 'FontUnits','normalized',...
|
wolffd@0
|
2188 'Style','text', ...
|
wolffd@0
|
2189 'Tag','StaticText3');
|
wolffd@0
|
2190 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2191 'Units','normalized', ...
|
wolffd@0
|
2192 'ListboxTop',0, ...
|
wolffd@0
|
2193 'Position',[0.05707762557077625 0.1288659793814433 0.2996575342465753 0.09664948453608246], ...
|
wolffd@0
|
2194 'String','Missing value', ...
|
wolffd@0
|
2195 'Style','checkbox', ...
|
wolffd@0
|
2196 'FontUnits','normalized',...
|
wolffd@0
|
2197 'Tag','Checkbox1');
|
wolffd@0
|
2198 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2199 'Units','normalized', ...
|
wolffd@0
|
2200 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2201 'Callback','som_gui(''missing'');',...
|
wolffd@0
|
2202 'ListboxTop',0, ...
|
wolffd@0
|
2203 'Position',[0.5136986301369862 0.1258659793814433 0.08561643835616438 0.10664948453608246], ...
|
wolffd@0
|
2204 'String','x', ...
|
wolffd@0
|
2205 'FontUnits','normalized',...
|
wolffd@0
|
2206 'Style','edit', ...
|
wolffd@0
|
2207 'Tag','EditText3');
|
wolffd@0
|
2208 if nargout > 0, fig = h0; end
|
wolffd@0
|
2209
|
wolffd@0
|
2210 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
2211
|
wolffd@0
|
2212
|
wolffd@0
|
2213 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
2214
|
wolffd@0
|
2215
|
wolffd@0
|
2216
|
wolffd@0
|
2217
|
wolffd@0
|
2218 function fig = works()
|
wolffd@0
|
2219
|
wolffd@0
|
2220 v = version;
|
wolffd@0
|
2221 ver_53_or_newer = (str2num(v(1:3)) >= 5.3);
|
wolffd@0
|
2222
|
wolffd@0
|
2223 h0 = figure('Units','normalized', ...
|
wolffd@0
|
2224 'Color',[0.8 0.8 0.8], ...
|
wolffd@0
|
2225 'Name','Load from workspace!', ...
|
wolffd@0
|
2226 'NumberTitle','off', ...
|
wolffd@0
|
2227 'PaperPosition',[18 180 576 432], ...
|
wolffd@0
|
2228 'PaperType','a4letter', ...
|
wolffd@0
|
2229 'PaperUnits','points', ...
|
wolffd@0
|
2230 'Position',[0.5390625 0.2490234375 0.203125 0.251953125], ...
|
wolffd@0
|
2231 'Tag','Fig1');
|
wolffd@0
|
2232 if ver_53_or_newer, set(h0,'ToolBar','none'); end
|
wolffd@0
|
2233
|
wolffd@0
|
2234 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2235 'Units','normalized', ...
|
wolffd@0
|
2236 'ListboxTop',0, ...
|
wolffd@0
|
2237 'Position',[0.05384615384615385 0.1472868217054263 0.9076923076923078 0.8255813953488372], ...
|
wolffd@0
|
2238 'Style','frame', ...
|
wolffd@0
|
2239 'Tag','Frame1');
|
wolffd@0
|
2240 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2241 'Units','normalized', ...
|
wolffd@0
|
2242 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2243 'Callback','som_gui(''works_ok'');', ...
|
wolffd@0
|
2244 'ListboxTop',0, ...
|
wolffd@0
|
2245 'Position',[0.1077 0.0194 0.2885 0.1202], ...
|
wolffd@0
|
2246 'String','OK', ...
|
wolffd@0
|
2247 'FontUnits','normalized',...
|
wolffd@0
|
2248 'Tag','Pushbutton1');
|
wolffd@0
|
2249 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2250 'Units','normalized', ...
|
wolffd@0
|
2251 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2252 'Callback','close;', ...
|
wolffd@0
|
2253 'ListboxTop',0, ...
|
wolffd@0
|
2254 'Position',[0.6115 0.0155 0.2885 0.1202], ...
|
wolffd@0
|
2255 'String','Cancel', ...
|
wolffd@0
|
2256 'FontUnits','normalized',...
|
wolffd@0
|
2257 'Tag','Pushbutton2');
|
wolffd@0
|
2258 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2259 'Units','normalized', ...
|
wolffd@0
|
2260 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2261 'Position',[0.1192 0.1977 0.7692 0.6395], ...
|
wolffd@0
|
2262 'String',' ', ...
|
wolffd@0
|
2263 'FontUnits','normalized',...
|
wolffd@0
|
2264 'Style','listbox', ...
|
wolffd@0
|
2265 'Tag','Listbox1', ...
|
wolffd@0
|
2266 'Value',1);
|
wolffd@0
|
2267 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2268 'Units','normalized', ...
|
wolffd@0
|
2269 'FontWeight','bold', ...
|
wolffd@0
|
2270 'ListboxTop',0, ...
|
wolffd@0
|
2271 'Position',[0.2115384615384616 0.8720930232558139 0.576923076923077 0.06976744186046512], ...
|
wolffd@0
|
2272 'String','Your options', ...
|
wolffd@0
|
2273 'FontUnits','normalized',...
|
wolffd@0
|
2274 'Style','text', ...
|
wolffd@0
|
2275 'Tag','StaticText1');
|
wolffd@0
|
2276 if nargout > 0, fig = h0; end
|
wolffd@0
|
2277
|
wolffd@0
|
2278
|
wolffd@0
|
2279
|
wolffd@0
|
2280
|
wolffd@0
|
2281
|
wolffd@0
|
2282
|
wolffd@0
|
2283 function fig = initialization2()
|
wolffd@0
|
2284
|
wolffd@0
|
2285
|
wolffd@0
|
2286 temp1 = {'random';'linear'};
|
wolffd@0
|
2287 temp2 = {'hexa';'rect'};
|
wolffd@0
|
2288 temp3 = {'sheet';'cyl';'toroid'};
|
wolffd@0
|
2289
|
wolffd@0
|
2290
|
wolffd@0
|
2291
|
wolffd@0
|
2292 % position bug in following corrected 1.12.04 KimmoR
|
wolffd@0
|
2293 h0 = figure('Units','normalized', ...
|
wolffd@0
|
2294 'Color',[0.8 0.8 0.8], ...
|
wolffd@0
|
2295 'Name','Change initialization parameters!', ...
|
wolffd@0
|
2296 'NumberTitle','off', ...
|
wolffd@0
|
2297 'PaperType','a4letter', ...
|
wolffd@0
|
2298 'Position',[0.48828125 0.4267578125 0.3515625 0.146484375], ...
|
wolffd@0
|
2299 'Tag','Fig1');
|
wolffd@0
|
2300 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2301 'Units','normalized', ...
|
wolffd@0
|
2302 'ListboxTop',0, ...
|
wolffd@0
|
2303 'Position',[0.02777777777777778 0.08333333333333333 0.8055555555555556 0.8333333333333334], ...
|
wolffd@0
|
2304 'Style','frame', ...
|
wolffd@0
|
2305 'Tag','Frame1');
|
wolffd@0
|
2306 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2307 'Units','normalized', ...
|
wolffd@0
|
2308 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2309 'Callback','som_gui(''change_initialization_ok'');', ...
|
wolffd@0
|
2310 'ListboxTop',0, ...
|
wolffd@0
|
2311 'Position',[0.8472222222222222 0.55 0.125 0.25], ...
|
wolffd@0
|
2312 'FontUnits','normalized',...
|
wolffd@0
|
2313 'String','OK', ...
|
wolffd@0
|
2314 'Tag','Pushbutton1');
|
wolffd@0
|
2315 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2316 'Units','normalized', ...
|
wolffd@0
|
2317 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2318 'Callback','som_gui(''change_initialization_cancel'');', ...
|
wolffd@0
|
2319 'ListboxTop',0, ...
|
wolffd@0
|
2320 'Position',[0.8472222222222222 0.25 0.125 0.25], ...
|
wolffd@0
|
2321 'FontUnits','normalized',...
|
wolffd@0
|
2322 'String','Cancel', ...
|
wolffd@0
|
2323 'Tag','Pushbutton2');
|
wolffd@0
|
2324 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2325 'Units','normalized', ...
|
wolffd@0
|
2326 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2327 'FontWeight','bold', ...
|
wolffd@0
|
2328 'HorizontalAlignment','left', ...
|
wolffd@0
|
2329 'ListboxTop',0, ...
|
wolffd@0
|
2330 'Position',[0.08333333333333334 0.6666666666666666 0.7066666666666667 0.1933333333333333], ...
|
wolffd@0
|
2331 'String','Initialization parameters:', ...
|
wolffd@0
|
2332 'FontUnits','normalized',...
|
wolffd@0
|
2333 'Style','text', ...
|
wolffd@0
|
2334 'Tag','StaticText1');
|
wolffd@0
|
2335 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2336 'Units','normalized', ...
|
wolffd@0
|
2337 'HorizontalAlignment','left', ...
|
wolffd@0
|
2338 'ListboxTop',0, ...
|
wolffd@0
|
2339 'Position',[0.0556 0.200 0.1667 0.1250],...
|
wolffd@0
|
2340 'String','type:', ...
|
wolffd@0
|
2341 'FontUnits','normalized',...
|
wolffd@0
|
2342 'Style','text', ...
|
wolffd@0
|
2343 'Tag','StaticText2');
|
wolffd@0
|
2344 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2345 'Units','normalized', ...
|
wolffd@0
|
2346 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2347 'ListboxTop',0, ...
|
wolffd@0
|
2348 'Max',2, ...
|
wolffd@0
|
2349 'Min',1, ...
|
wolffd@0
|
2350 'Position',[0.2500 0.200 0.1667 0.1250], ...
|
wolffd@0
|
2351 'String',temp1, ...
|
wolffd@0
|
2352 'FontUnits','normalized',...
|
wolffd@0
|
2353 'Style','popupmenu', ...
|
wolffd@0
|
2354 'Tag','PopupMenu1', ...
|
wolffd@0
|
2355 'Value',1);
|
wolffd@0
|
2356 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2357 'Units','normalized', ...
|
wolffd@0
|
2358 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2359 'HorizontalAlignment','left', ...
|
wolffd@0
|
2360 'ListboxTop',0, ...
|
wolffd@0
|
2361 'Position',[0.05555555555555556 0.6 0.1666666666666667 0.125], ...
|
wolffd@0
|
2362 'String','map size:', ...
|
wolffd@0
|
2363 'FontUnits','normalized',...
|
wolffd@0
|
2364 'Style','text', ...
|
wolffd@0
|
2365 'Tag','StaticText2');
|
wolffd@0
|
2366 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2367 'Units','normalized', ...
|
wolffd@0
|
2368 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2369 'Callback','som_gui(''map_size'');', ...
|
wolffd@0
|
2370 'HorizontalAlignment','left', ...
|
wolffd@0
|
2371 'ListboxTop',0, ...
|
wolffd@0
|
2372 'Position',[0.25 0.6 0.1666666666666667 0.125], ...
|
wolffd@0
|
2373 'FontUnits','normalized',...
|
wolffd@0
|
2374 'Style','edit', ...
|
wolffd@0
|
2375 'Tag','EditText1');
|
wolffd@0
|
2376 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2377 'Units','normalized', ...
|
wolffd@0
|
2378 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2379 'HorizontalAlignment','left', ...
|
wolffd@0
|
2380 'ListboxTop',0, ...
|
wolffd@0
|
2381 'Position',[0.05555555555555556 0.4033333333333333 0.1666666666666667 0.125], ...
|
wolffd@0
|
2382 'String','lattice:', ...
|
wolffd@0
|
2383 'FontUnits','normalized',...
|
wolffd@0
|
2384 'Style','text', ...
|
wolffd@0
|
2385 'Tag','StaticText3');
|
wolffd@0
|
2386 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2387 'Units','normalized', ...
|
wolffd@0
|
2388 'ListboxTop',0, ...
|
wolffd@0
|
2389 'Max',2, ...
|
wolffd@0
|
2390 'Min',1, ...
|
wolffd@0
|
2391 'Position',[0.25 0.4333333333333333 0.1666666666666667 0.125], ...
|
wolffd@0
|
2392 'String',temp2, ...
|
wolffd@0
|
2393 'FontUnits','normalized',...
|
wolffd@0
|
2394 'Style','popupmenu', ...
|
wolffd@0
|
2395 'Tag','PopupMenu2', ...
|
wolffd@0
|
2396 'Value',2);
|
wolffd@0
|
2397 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2398 'Units','normalized', ...
|
wolffd@0
|
2399 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2400 'HorizontalAlignment','left', ...
|
wolffd@0
|
2401 'ListboxTop',0, ...
|
wolffd@0
|
2402 'Position',[0.4444444444444445 0.4033333333333333 0.1666666666666667 0.125], ...
|
wolffd@0
|
2403 'String','shape:', ...
|
wolffd@0
|
2404 'FontUnits','normalized',...
|
wolffd@0
|
2405 'Style','text', ...
|
wolffd@0
|
2406 'Tag','StaticText4');
|
wolffd@0
|
2407 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2408 'Units','normalized', ...
|
wolffd@0
|
2409 'ListboxTop',0, ...
|
wolffd@0
|
2410 'Max',3, ...
|
wolffd@0
|
2411 'Min',1, ...
|
wolffd@0
|
2412 'Position',[0.638888888888889 0.4333333333333333 0.1666666666666667 0.125], ...
|
wolffd@0
|
2413 'String',temp3, ...
|
wolffd@0
|
2414 'FontUnits','normalized',...
|
wolffd@0
|
2415 'Style','popupmenu', ...
|
wolffd@0
|
2416 'Tag','PopupMenu3', ...
|
wolffd@0
|
2417 'Value',2);
|
wolffd@0
|
2418 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2419 'Units','normalized', ...
|
wolffd@0
|
2420 'HorizontalAlignment','left', ...
|
wolffd@0
|
2421 'ListboxTop',0, ...
|
wolffd@0
|
2422 'Position',[0.4444444444444445 0.6 0.1666666666666667 0.125], ...
|
wolffd@0
|
2423 'FontUnits','normalized',...
|
wolffd@0
|
2424 'String','munits:', ...
|
wolffd@0
|
2425 'Style','text', ...
|
wolffd@0
|
2426 'Tag','StaticText5');
|
wolffd@0
|
2427 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2428 'Units','normalized', ...
|
wolffd@0
|
2429 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2430 'Callback','som_gui(''munits'');', ...
|
wolffd@0
|
2431 'ListboxTop',0, ...
|
wolffd@0
|
2432 'Position',[0.638888888888889 0.6 0.1666666666666667 0.125], ...
|
wolffd@0
|
2433 'Style','edit', ...
|
wolffd@0
|
2434 'FontUnits','normalized',...
|
wolffd@0
|
2435 'Tag','EditText2');
|
wolffd@0
|
2436 if nargout > 0, fig = h0; end
|
wolffd@0
|
2437
|
wolffd@0
|
2438
|
wolffd@0
|
2439
|
wolffd@0
|
2440
|
wolffd@0
|
2441
|
wolffd@0
|
2442
|
wolffd@0
|
2443
|
wolffd@0
|
2444 function fig = new_para2_2()
|
wolffd@0
|
2445
|
wolffd@0
|
2446 temp1 = {'0';'1';'2';'3'};
|
wolffd@0
|
2447 temp2 = {'gaussian';'cutgauss';'ep';'bubble'};
|
wolffd@0
|
2448 temp3 = {'epochs';'samples'};
|
wolffd@0
|
2449 temp4 = {'random';'ordered'};
|
wolffd@0
|
2450 temp5 = {'inv';'linear';'power'};
|
wolffd@0
|
2451
|
wolffd@0
|
2452 v = version;
|
wolffd@0
|
2453 ver_53_or_newer = (str2num(v(1:3)) >= 5.3);
|
wolffd@0
|
2454
|
wolffd@0
|
2455 h0 = figure('Units','normalized', ...
|
wolffd@0
|
2456 'Color',[0.8 0.8 0.8], ...
|
wolffd@0
|
2457 'Name','Change training parameters!', ...
|
wolffd@0
|
2458 'NumberTitle','off', ...
|
wolffd@0
|
2459 'PaperPosition',[18 180 576 432], ...
|
wolffd@0
|
2460 'PaperType','a4letter', ...
|
wolffd@0
|
2461 'PaperUnits','points', ...
|
wolffd@0
|
2462 'Position',[0.59140625 0.4560546875 0.3046875 0.4619140625], ...
|
wolffd@0
|
2463 'Tag','Fig3');
|
wolffd@0
|
2464 if ver_53_or_newer, set(h0,'ToolBar','none'); end
|
wolffd@0
|
2465 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2466 'Units','normalized', ...
|
wolffd@0
|
2467 'ListboxTop',0, ...
|
wolffd@0
|
2468 'Position',[0.02051282051282051 0.08456659619450317 0.9641025641025641 0.8921775898520086], ...
|
wolffd@0
|
2469 'Style','frame', ...
|
wolffd@0
|
2470 'Tag','Frame1');
|
wolffd@0
|
2471 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2472 'Units','normalized', ...
|
wolffd@0
|
2473 'ListboxTop',0, ...
|
wolffd@0
|
2474 'Position',[0.5308 0.1374 0.4000 0.3742], ...
|
wolffd@0
|
2475 'Style','frame', ...
|
wolffd@0
|
2476 'Tag','Frame3');
|
wolffd@0
|
2477 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2478 'Units','normalized', ...
|
wolffd@0
|
2479 'ListboxTop',0, ...
|
wolffd@0
|
2480 'Position',[0.08012820512820512 0.1416490486257928 0.4102564102564102 0.3699788583509514], ...
|
wolffd@0
|
2481 'Style','frame', ...
|
wolffd@0
|
2482 'Tag','Frame2');
|
wolffd@0
|
2483 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2484 'Units','normalized', ...
|
wolffd@0
|
2485 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2486 'Callback','close(gcbf);', ...
|
wolffd@0
|
2487 'ListboxTop',0, ...
|
wolffd@0
|
2488 'Position',[0.6410 0.0036 0.2897 0.0740], ...
|
wolffd@0
|
2489 'FontUnits','normalized',...
|
wolffd@0
|
2490 'String','Cancel', ...
|
wolffd@0
|
2491 'Tag','Pushbutton2');
|
wolffd@0
|
2492 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2493 'Units','normalized', ...
|
wolffd@0
|
2494 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2495 'Callback','som_gui(''set_new_parameters'');', ...
|
wolffd@0
|
2496 'ListboxTop',0, ...
|
wolffd@0
|
2497 'Position',[0.1026 0.0036 0.2897 0.0740], ...
|
wolffd@0
|
2498 'String','Set parameters', ...
|
wolffd@0
|
2499 'FontUnits','normalized',...
|
wolffd@0
|
2500 'Tag','Pushbutton1');
|
wolffd@0
|
2501 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2502 'Units','normalized', ...
|
wolffd@0
|
2503 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2504 'ListboxTop',0, ...
|
wolffd@0
|
2505 'Max',4, ...
|
wolffd@0
|
2506 'Min',1, ...
|
wolffd@0
|
2507 'Position',[0.7051282051282051 0.6723044397463003 0.1923076923076923 0.040169133192389], ...
|
wolffd@0
|
2508 'String',temp1, ...
|
wolffd@0
|
2509 'FontUnits','normalized',...
|
wolffd@0
|
2510 'Style','popupmenu', ...
|
wolffd@0
|
2511 'Tag','PopupMenu2', ...
|
wolffd@0
|
2512 'Value',1);
|
wolffd@0
|
2513 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2514 'Units','normalized', ...
|
wolffd@0
|
2515 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2516 'ListboxTop',0, ...
|
wolffd@0
|
2517 'Max',4, ...
|
wolffd@0
|
2518 'Min',1, ...
|
wolffd@0
|
2519 'Position',[0.2948717948717949 0.6670190274841438 0.1923076923076923 0.03964059196617336], ...
|
wolffd@0
|
2520 'String',temp2, ...
|
wolffd@0
|
2521 'FontUnits','normalized',...
|
wolffd@0
|
2522 'Style','popupmenu', ...
|
wolffd@0
|
2523 'Tag','PopupMenu1', ...
|
wolffd@0
|
2524 'Value',1);
|
wolffd@0
|
2525 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2526 'Units','normalized', ...
|
wolffd@0
|
2527 'Callback','som_gui(''batch_cancel'');', ...
|
wolffd@0
|
2528 'HorizontalAlignment','left', ...
|
wolffd@0
|
2529 'ListboxTop',0, ...
|
wolffd@0
|
2530 'Position',[0.5076923076923077 0.6575052854122622 0.1923076923076923 0.05285412262156448], ...
|
wolffd@0
|
2531 'String','tracking', ...
|
wolffd@0
|
2532 'FontUnits','normalized',...
|
wolffd@0
|
2533 'Style','text', ...
|
wolffd@0
|
2534 'Tag','StaticText6');
|
wolffd@0
|
2535 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2536 'Units','normalized', ...
|
wolffd@0
|
2537 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2538 'Callback','som_gui(''batch_cancel'');', ...
|
wolffd@0
|
2539 'HorizontalAlignment','left', ...
|
wolffd@0
|
2540 'ListboxTop',0, ...
|
wolffd@0
|
2541 'Position',[0.09615384615384615 0.6553911205073996 0.1923076923076923 0.05285412262156448], ...
|
wolffd@0
|
2542 'String','neigh.', ...
|
wolffd@0
|
2543 'FontUnits','normalized',...
|
wolffd@0
|
2544 'Style','text', ...
|
wolffd@0
|
2545 'Tag','StaticText5');
|
wolffd@0
|
2546 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2547 'Units','normalized', ...
|
wolffd@0
|
2548 'HorizontalAlignment','left', ...
|
wolffd@0
|
2549 'ListboxTop',0, ...
|
wolffd@0
|
2550 'Position',[0.09615384615384615 0.7526427061310783 0.09487179487179487 0.04228329809725159], ...
|
wolffd@0
|
2551 'String','mask:', ...
|
wolffd@0
|
2552 'FontUnits','normalized',...
|
wolffd@0
|
2553 'Style','text', ...
|
wolffd@0
|
2554 'Tag','StaticText2');
|
wolffd@0
|
2555 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2556 'Units','normalized', ...
|
wolffd@0
|
2557 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2558 'Position',[0.2948717948717949 0.7399577167019028 0.6025641025641025 0.07399577167019028], ...
|
wolffd@0
|
2559 'String',' ', ...
|
wolffd@0
|
2560 'FontUnits','normalized',...
|
wolffd@0
|
2561 'Style','listbox', ...
|
wolffd@0
|
2562 'Tag','Listbox2', ...
|
wolffd@0
|
2563 'Value',1);
|
wolffd@0
|
2564 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2565 'Units','normalized', ...
|
wolffd@0
|
2566 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2567 'HorizontalAlignment','left', ...
|
wolffd@0
|
2568 'ListboxTop',0, ...
|
wolffd@0
|
2569 'Position',[0.0962 0.8060 0.1154 0.0529], ...
|
wolffd@0
|
2570 'FontUnits','normalized',...
|
wolffd@0
|
2571 'String','Set', ...
|
wolffd@0
|
2572 'Style','text', ...
|
wolffd@0
|
2573 'Tag','StaticText3');
|
wolffd@0
|
2574 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2575 'Units','normalized', ...
|
wolffd@0
|
2576 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2577 'Callback','som_gui(''set_batch_mask'');', ...
|
wolffd@0
|
2578 'Position',[0.2948717948717949 0.8165961945031712 0.3205128205128205 0.05285412262156448], ...
|
wolffd@0
|
2579 'String',' ', ...
|
wolffd@0
|
2580 'FontUnits','normalized',...
|
wolffd@0
|
2581 'Style','listbox', ...
|
wolffd@0
|
2582 'Tag','Listbox1', ...
|
wolffd@0
|
2583 'Value',1);
|
wolffd@0
|
2584 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2585 'Units','normalized', ...
|
wolffd@0
|
2586 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2587 'HorizontalAlignment','left', ...
|
wolffd@0
|
2588 'ListboxTop',0, ...
|
wolffd@0
|
2589 'Position',[0.6250 0.8060 0.1603 0.0529], ...
|
wolffd@0
|
2590 'String','to value', ...
|
wolffd@0
|
2591 'FontUnits','normalized',...
|
wolffd@0
|
2592 'Style','text', ...
|
wolffd@0
|
2593 'Tag','StaticText4');
|
wolffd@0
|
2594 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2595 'Units','normalized', ...
|
wolffd@0
|
2596 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2597 'Callback','som_gui(''set_batch_mask'');', ...
|
wolffd@0
|
2598 'ListboxTop',0, ...
|
wolffd@0
|
2599 'Position',[0.7923076923076923 0.8181818181818182 0.09487179487179487 0.05285412262156448], ...
|
wolffd@0
|
2600 'Style','edit', ...
|
wolffd@0
|
2601 'FontUnits','normalized',...
|
wolffd@0
|
2602 'Tag','EditText2');
|
wolffd@0
|
2603 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2604 'Units','normalized', ...
|
wolffd@0
|
2605 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2606 'Callback','som_gui(''check_fine_trainlen'');', ...
|
wolffd@0
|
2607 'ListboxTop',0, ...
|
wolffd@0
|
2608 'Position',[0.7923 0.2352 0.0974 0.0402], ...
|
wolffd@0
|
2609 'FontUnits','normalized',...
|
wolffd@0
|
2610 'Style','edit', ...
|
wolffd@0
|
2611 'Tag','EditText11');
|
wolffd@0
|
2612 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2613 'Units','normalized', ...
|
wolffd@0
|
2614 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2615 'Callback','som_gui(''check_fine_alphaini'');', ...
|
wolffd@0
|
2616 'Enable','off', ...
|
wolffd@0
|
2617 'ListboxTop',0, ...
|
wolffd@0
|
2618 'Position',[0.7923076923076923 0.1664904862579281 0.09743589743589742 0.03805496828752643], ...
|
wolffd@0
|
2619 'Style','edit', ...
|
wolffd@0
|
2620 'FontUnits','normalized',...
|
wolffd@0
|
2621 'Tag','EditText10', ...
|
wolffd@0
|
2622 'Visible','off');
|
wolffd@0
|
2623 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2624 'Units','normalized', ...
|
wolffd@0
|
2625 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2626 'Callback','som_gui(''check_fine_radfin'');', ...
|
wolffd@0
|
2627 'ListboxTop',0, ...
|
wolffd@0
|
2628 'Position',[0.7923076923076923 0.3002114164904862 0.09743589743589742 0.040169133192389], ...
|
wolffd@0
|
2629 'Style','edit', ...
|
wolffd@0
|
2630 'FontUnits','normalized',...
|
wolffd@0
|
2631 'Tag','EditText9');
|
wolffd@0
|
2632 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2633 'Units','normalized', ...
|
wolffd@0
|
2634 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2635 'Callback','som_gui(''check_fine_radini'');', ...
|
wolffd@0
|
2636 'ListboxTop',0, ...
|
wolffd@0
|
2637 'Position',[0.7923076923076923 0.3657505285412262 0.09743589743589742 0.040169133192389], ...
|
wolffd@0
|
2638 'Style','edit', ...
|
wolffd@0
|
2639 'FontUnits','normalized',...
|
wolffd@0
|
2640 'Tag','EditText8');
|
wolffd@0
|
2641 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2642 'Units','normalized', ...
|
wolffd@0
|
2643 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2644 'HorizontalAlignment','left', ...
|
wolffd@0
|
2645 'ListboxTop',0, ...
|
wolffd@0
|
2646 'Position',[0.5590 0.2326 0.2179 0.0402], ...
|
wolffd@0
|
2647 'String','training length', ...
|
wolffd@0
|
2648 'FontUnits','normalized',...
|
wolffd@0
|
2649 'Style','text', ...
|
wolffd@0
|
2650 'Tag','StaticText16');
|
wolffd@0
|
2651 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2652 'Units','normalized', ...
|
wolffd@0
|
2653 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2654 'HorizontalAlignment','left', ...
|
wolffd@0
|
2655 'ListboxTop',0, ...
|
wolffd@0
|
2656 'Position',[0.5590 0.1665 0.2179 0.0381], ...
|
wolffd@0
|
2657 'String','alpha initial', ...
|
wolffd@0
|
2658 'FontUnits','normalized',...
|
wolffd@0
|
2659 'Style','text', ...
|
wolffd@0
|
2660 'Tag','StaticText14', ...
|
wolffd@0
|
2661 'Visible','off');
|
wolffd@0
|
2662 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2663 'Units','normalized', ...
|
wolffd@0
|
2664 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2665 'HorizontalAlignment','left', ...
|
wolffd@0
|
2666 'ListboxTop',0, ...
|
wolffd@0
|
2667 'Position',[0.5590 0.2981 0.2179 0.0402], ...
|
wolffd@0
|
2668 'String','radius final', ...
|
wolffd@0
|
2669 'FontUnits','normalized',...
|
wolffd@0
|
2670 'Style','text', ...
|
wolffd@0
|
2671 'Tag','StaticText12');
|
wolffd@0
|
2672 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2673 'Units','normalized', ...
|
wolffd@0
|
2674 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2675 'HorizontalAlignment','left', ...
|
wolffd@0
|
2676 'ListboxTop',0, ...
|
wolffd@0
|
2677 'Position',[0.5590 0.3636 0.2179 0.0402], ...
|
wolffd@0
|
2678 'String','radius initial', ...
|
wolffd@0
|
2679 'FontUnits','normalized',...
|
wolffd@0
|
2680 'Style','text', ...
|
wolffd@0
|
2681 'Tag','StaticText10');
|
wolffd@0
|
2682 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2683 'Units','normalized', ...
|
wolffd@0
|
2684 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2685 'Callback','som_gui(''check_rough_trainlen'');', ...
|
wolffd@0
|
2686 'ListboxTop',0, ...
|
wolffd@0
|
2687 'Position',[0.3590 0.2352 0.0949 0.0402], ...
|
wolffd@0
|
2688 'Style','edit', ...
|
wolffd@0
|
2689 'FontUnits','normalized',...
|
wolffd@0
|
2690 'Tag','EditText7');
|
wolffd@0
|
2691 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2692 'Units','normalized', ...
|
wolffd@0
|
2693 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2694 'Callback','som_gui(''check_rough_alphaini'');', ...
|
wolffd@0
|
2695 'Enable','off', ...
|
wolffd@0
|
2696 'ListboxTop',0, ...
|
wolffd@0
|
2697 'Position',[0.3590 0.1691 0.0949 0.0381], ...
|
wolffd@0
|
2698 'Style','edit', ...
|
wolffd@0
|
2699 'FontUnits','normalized',...
|
wolffd@0
|
2700 'Tag','EditText6', ...
|
wolffd@0
|
2701 'Visible','off');
|
wolffd@0
|
2702 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2703 'Units','normalized', ...
|
wolffd@0
|
2704 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2705 'Callback','som_gui(''check_rough_radfin'');', ...
|
wolffd@0
|
2706 'ListboxTop',0, ...
|
wolffd@0
|
2707 'Position',[0.358974358974359 0.3044397463002114 0.09487179487179487 0.040169133192389], ...
|
wolffd@0
|
2708 'Style','edit', ...
|
wolffd@0
|
2709 'FontUnits','normalized',...
|
wolffd@0
|
2710 'Tag','EditText5');
|
wolffd@0
|
2711 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2712 'Units','normalized', ...
|
wolffd@0
|
2713 'BackgroundColor',[1 1 1], ...
|
wolffd@0
|
2714 'Callback','som_gui(''check_rough_radini'');', ...
|
wolffd@0
|
2715 'ListboxTop',0, ...
|
wolffd@0
|
2716 'Position',[0.358974358974359 0.3699788583509514 0.09487179487179487 0.040169133192389], ...
|
wolffd@0
|
2717 'Style','edit', ...
|
wolffd@0
|
2718 'FontUnits','normalized',...
|
wolffd@0
|
2719 'Tag','EditText4');
|
wolffd@0
|
2720 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2721 'Units','normalized', ...
|
wolffd@0
|
2722 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2723 'HorizontalAlignment','left', ...
|
wolffd@0
|
2724 'ListboxTop',0, ...
|
wolffd@0
|
2725 'Position',[0.0962 0.2326 0.2179 0.0402], ...
|
wolffd@0
|
2726 'String','training length', ...
|
wolffd@0
|
2727 'FontUnits','normalized',...
|
wolffd@0
|
2728 'Style','text', ...
|
wolffd@0
|
2729 'Tag','StaticText15');
|
wolffd@0
|
2730 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2731 'Units','normalized', ...
|
wolffd@0
|
2732 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2733 'HorizontalAlignment','left', ...
|
wolffd@0
|
2734 'ListboxTop',0, ...
|
wolffd@0
|
2735 'Position',[0.0962 0.1691 0.2179 0.0381], ...
|
wolffd@0
|
2736 'String','alpha initial', ...
|
wolffd@0
|
2737 'FontUnits','normalized',...
|
wolffd@0
|
2738 'Style','text', ...
|
wolffd@0
|
2739 'Tag','StaticText13', ...
|
wolffd@0
|
2740 'Visible','off');
|
wolffd@0
|
2741 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2742 'Units','normalized', ...
|
wolffd@0
|
2743 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2744 'HorizontalAlignment','left', ...
|
wolffd@0
|
2745 'ListboxTop',0, ...
|
wolffd@0
|
2746 'Position',[0.0962 0.3023 0.2179 0.0402], ...
|
wolffd@0
|
2747 'String','radius final', ...
|
wolffd@0
|
2748 'FontUnits','normalized',...
|
wolffd@0
|
2749 'Style','text', ...
|
wolffd@0
|
2750 'Tag','StaticText11');
|
wolffd@0
|
2751 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2752 'Units','normalized', ...
|
wolffd@0
|
2753 'BackgroundColor',[0.8 0.8 0.8], ...
|
wolffd@0
|
2754 'HorizontalAlignment','left', ...
|
wolffd@0
|
2755 'ListboxTop',0, ...
|
wolffd@0
|
2756 'Position',[0.0962 0.3679 0.2179 0.0402], ...
|
wolffd@0
|
2757 'FontUnits','normalized',...
|
wolffd@0
|
2758 'String','radius initial', ...
|
wolffd@0
|
2759 'Style','text', ...
|
wolffd@0
|
2760 'Tag','StaticText9');
|
wolffd@0
|
2761 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2762 'Units','normalized', ...
|
wolffd@0
|
2763 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2764 'ListboxTop',0, ...
|
wolffd@0
|
2765 'Position',[0.5948717948717949 0.4291754756871036 0.2871794871794872 0.05285412262156448], ...
|
wolffd@0
|
2766 'String','Finetune', ...
|
wolffd@0
|
2767 'FontUnits','normalized',...
|
wolffd@0
|
2768 'Style','text', ...
|
wolffd@0
|
2769 'Tag','StaticText8');
|
wolffd@0
|
2770 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2771 'Units','normalized', ...
|
wolffd@0
|
2772 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2773 'ListboxTop',0, ...
|
wolffd@0
|
2774 'Position',[0.1205128205128205 0.4355179704016914 0.3153846153846154 0.04862579281183932], ...
|
wolffd@0
|
2775 'String','Rough', ...
|
wolffd@0
|
2776 'FontUnits','normalized',...
|
wolffd@0
|
2777 'Style','text', ...
|
wolffd@0
|
2778 'Tag','StaticText7');
|
wolffd@0
|
2779 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2780 'Units','normalized', ...
|
wolffd@0
|
2781 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2782 'FontWeight','bold', ...
|
wolffd@0
|
2783 'ListboxTop',0, ...
|
wolffd@0
|
2784 'Position',[0.1641025641025641 0.8900634249471459 0.7025641025641025 0.05285412262156448], ...
|
wolffd@0
|
2785 'String','Change parameters for batch training', ...
|
wolffd@0
|
2786 'Style','text', ...
|
wolffd@0
|
2787 'FontUnits','normalized',...
|
wolffd@0
|
2788 'Tag','StaticText1');
|
wolffd@0
|
2789 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2790 'Units','normalized', ...
|
wolffd@0
|
2791 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2792 'HorizontalAlignment','left', ...
|
wolffd@0
|
2793 'ListboxTop',0, ...
|
wolffd@0
|
2794 'Position',[0.09615384615384615 0.6025369978858351 0.1743589743589744 0.040169133192389], ...
|
wolffd@0
|
2795 'String','length type:', ...
|
wolffd@0
|
2796 'Style','text', ...
|
wolffd@0
|
2797 'FontUnits','normalized',...
|
wolffd@0
|
2798 'Tag','StaticText17');
|
wolffd@0
|
2799 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2800 'Units','normalized', ...
|
wolffd@0
|
2801 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2802 'ListboxTop',0, ...
|
wolffd@0
|
2803 'Max',2, ...
|
wolffd@0
|
2804 'Min',1, ...
|
wolffd@0
|
2805 'Position',[0.2948717948717949 0.6062367864693446 0.1923076923076923 0.03964059196617336], ...
|
wolffd@0
|
2806 'String',temp3, ...
|
wolffd@0
|
2807 'FontUnits','normalized',...
|
wolffd@0
|
2808 'Style','popupmenu', ...
|
wolffd@0
|
2809 'Tag','PopupMenu3', ...
|
wolffd@0
|
2810 'Value',1);
|
wolffd@0
|
2811 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2812 'Units','normalized', ...
|
wolffd@0
|
2813 'HorizontalAlignment','left', ...
|
wolffd@0
|
2814 'ListboxTop',0, ...
|
wolffd@0
|
2815 'Position',[0.5102564102564102 0.6004228329809724 0.1641025641025641 0.040169133192389], ...
|
wolffd@0
|
2816 'String','order', ...
|
wolffd@0
|
2817 'FontUnits','normalized',...
|
wolffd@0
|
2818 'Style','text', ...
|
wolffd@0
|
2819 'Tag','StaticText18');
|
wolffd@0
|
2820 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2821 'Units','normalized', ...
|
wolffd@0
|
2822 'HorizontalAlignment','left', ...
|
wolffd@0
|
2823 'ListboxTop',0, ...
|
wolffd@0
|
2824 'Max',2, ...
|
wolffd@0
|
2825 'Min',1, ...
|
wolffd@0
|
2826 'Position',[0.7051282051282051 0.6109936575052853 0.1923076923076923 0.040169133192389], ...
|
wolffd@0
|
2827 'String',temp4, ...
|
wolffd@0
|
2828 'FontUnits','normalized',...
|
wolffd@0
|
2829 'Style','popupmenu', ...
|
wolffd@0
|
2830 'Tag','PopupMenu4', ...
|
wolffd@0
|
2831 'Value',1);
|
wolffd@0
|
2832 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2833 'Units','normalized', ...
|
wolffd@0
|
2834 'HorizontalAlignment','left', ...
|
wolffd@0
|
2835 'ListboxTop',0, ...
|
wolffd@0
|
2836 'Position',[0.09615384615384615 0.5369978858350951 0.2051282051282051 0.040169133192389], ...
|
wolffd@0
|
2837 'String','learning func', ...
|
wolffd@0
|
2838 'FontUnits','normalized',...
|
wolffd@0
|
2839 'Style','text', ...
|
wolffd@0
|
2840 'Tag','StaticText19');
|
wolffd@0
|
2841 h1 = uicontrol('Parent',h0, ...
|
wolffd@0
|
2842 'Units','normalized', ...
|
wolffd@0
|
2843 'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
|
wolffd@0
|
2844 'ListboxTop',0, ...
|
wolffd@0
|
2845 'Max',3, ...
|
wolffd@0
|
2846 'Min',1, ...
|
wolffd@0
|
2847 'Position',[0.2948717948717949 0.5454545454545455 0.1923076923076923 0.03964059196617336], ...
|
wolffd@0
|
2848 'String',temp5, ...
|
wolffd@0
|
2849 'FontUnits','normalized',...
|
wolffd@0
|
2850 'Style','popupmenu', ...
|
wolffd@0
|
2851 'Tag','PopupMenu5', ...
|
wolffd@0
|
2852 'Value',1);
|
wolffd@0
|
2853 if nargout > 0, fig = h0; end
|
wolffd@0
|
2854
|
wolffd@0
|
2855
|
wolffd@0
|
2856 function print_info(sS,level,fid)
|
wolffd@0
|
2857
|
wolffd@0
|
2858
|
wolffd@0
|
2859 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
2860 %% check arguments
|
wolffd@0
|
2861
|
wolffd@0
|
2862
|
wolffd@0
|
2863 %error(nargchk(1, 2, nargin)) % check no. of input args is correct
|
wolffd@0
|
2864
|
wolffd@0
|
2865 if ~isstruct(sS),
|
wolffd@0
|
2866 if ~iscell(sS) | ~isstruct(sS{1}),
|
wolffd@0
|
2867 error('Input argument is not a struct or a cell array of structs.')
|
wolffd@0
|
2868 end
|
wolffd@0
|
2869 csS = sS;
|
wolffd@0
|
2870 else
|
wolffd@0
|
2871 csS = {sS};
|
wolffd@0
|
2872 end
|
wolffd@0
|
2873
|
wolffd@0
|
2874 if nargin<2 | isempty(level) | isnan(level), level = 1; end
|
wolffd@0
|
2875
|
wolffd@0
|
2876 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
wolffd@0
|
2877 %% print struct information
|
wolffd@0
|
2878
|
wolffd@0
|
2879 for c=1:length(csS),
|
wolffd@0
|
2880 sS = csS{c};
|
wolffd@0
|
2881
|
wolffd@0
|
2882 switch sS.type,
|
wolffd@0
|
2883 case 'som_map',
|
wolffd@0
|
2884 mdim = length(sS.topol.msize);
|
wolffd@0
|
2885 [munits dim] = size(sS.codebook);
|
wolffd@0
|
2886 t = length(sS.trainhist);
|
wolffd@0
|
2887 if t==0, st='uninitialized';
|
wolffd@0
|
2888 elseif t==1, st = 'initialized';
|
wolffd@0
|
2889 else st = sprintf('initialized, trained %d times',t-1);
|
wolffd@0
|
2890 end
|
wolffd@0
|
2891
|
wolffd@0
|
2892 % level 1
|
wolffd@0
|
2893 fprintf(fid,'%% Struct type : %s\n', sS.type);
|
wolffd@0
|
2894 fprintf(fid,'%% Map name : %s\n', sS.name);
|
wolffd@0
|
2895 fprintf(fid,'%% Input dimension : %d\n', dim);
|
wolffd@0
|
2896 fprintf(fid,'%% Map grid size : ');
|
wolffd@0
|
2897 for i = 1:mdim - 1, fprintf(fid,'%d x ',sS.topol.msize(i)); end
|
wolffd@0
|
2898 fprintf(fid,'%d\n', sS.topol.msize(mdim));
|
wolffd@0
|
2899 fprintf(fid,'%% Lattice type (rect/hexa) : %s\n', sS.topol.lattice);
|
wolffd@0
|
2900 fprintf(fid,'%% Shape (sheet/cyl/toroid) : %s\n', sS.topol.shape);
|
wolffd@0
|
2901 fprintf(fid,'%% Neighborhood type : %s\n', sS.neigh);
|
wolffd@0
|
2902 fprintf(fid,'%% Mask : ');
|
wolffd@0
|
2903 if dim,
|
wolffd@0
|
2904 for i = 1:dim-1, fprintf(fid,'%d ',sS.mask(i)); end;
|
wolffd@0
|
2905 fprintf(fid,'%d\n',sS.mask(dim));
|
wolffd@0
|
2906 else fprintf(fid,'%% \n');
|
wolffd@0
|
2907 end
|
wolffd@0
|
2908 fprintf(fid,'%% Training status : %s\n', st);
|
wolffd@0
|
2909
|
wolffd@0
|
2910 % level 1,
|
wolffd@0
|
2911 status = cell(dim,1);
|
wolffd@0
|
2912 for i=1:dim,
|
wolffd@0
|
2913 n = length(sS.comp_norm{i});
|
wolffd@0
|
2914 if n,
|
wolffd@0
|
2915 uninit = strcmp('uninit',{sS.comp_norm{i}.status});
|
wolffd@0
|
2916 done = strcmp('done',{sS.comp_norm{i}.status});
|
wolffd@0
|
2917 undone = strcmp('undone',{sS.comp_norm{i}.status});
|
wolffd@0
|
2918 if sum(uninit)==n, status{i} = 'no normalization';
|
wolffd@0
|
2919 elseif sum(done)==n, status{i} = 'normalized';
|
wolffd@0
|
2920 elseif sum(undone)==n, status{i} = 'denormalized';
|
wolffd@0
|
2921 else status{i} = 'partial';
|
wolffd@0
|
2922 end
|
wolffd@0
|
2923 else status{i} = 'no normalization'; end
|
wolffd@0
|
2924 end
|
wolffd@0
|
2925 if level>1,
|
wolffd@0
|
2926 fprintf(fid,'%% Vector components\n');
|
wolffd@0
|
2927 M = sS.codebook;
|
wolffd@0
|
2928 fprintf(fid,'%% # name mask min mean max std status\n');
|
wolffd@0
|
2929 fprintf(fid,'%% --- ------------ ---- ------ ------ ------ ------ ------\n');
|
wolffd@0
|
2930 for i = 1:dim,
|
wolffd@0
|
2931 fprintf(fid,'%% %-3d %-12s %-4.2f %6.1g %6.1g %6.1g %6.1g %s\n', ...
|
wolffd@0
|
2932 i,sS.comp_names{i}, sS.mask(i), ...
|
wolffd@0
|
2933 min(M(:,i)),mean(M(:,i)),max(M(:,i)),std(M(:,i)),status{i});
|
wolffd@0
|
2934 end
|
wolffd@0
|
2935 end
|
wolffd@0
|
2936
|
wolffd@0
|
2937 % level 3
|
wolffd@0
|
2938 if level>2,
|
wolffd@0
|
2939 fprintf(fid,'%% Vector component normalizations\n');
|
wolffd@0
|
2940 fprintf(fid,'%% # name method (i=uninit,u=undone,d=done)\n');
|
wolffd@0
|
2941 fprintf(fid,'%% --- ------------ ---------------------------------------\n');
|
wolffd@0
|
2942 for i=1:dim,
|
wolffd@0
|
2943 fprintf(fid,'%% %-3d %-12s ',i,sS.comp_names{i});
|
wolffd@0
|
2944 n = length(sS.comp_norm{i});
|
wolffd@0
|
2945 for j=1:n,
|
wolffd@0
|
2946 m = sS.comp_norm{i}(j).method;
|
wolffd@0
|
2947 s = sS.comp_norm{i}(j).status;
|
wolffd@0
|
2948 if strcmp(s,'uninit'), c='i';
|
wolffd@0
|
2949 elseif strcmp(s,'undone'), c='u';
|
wolffd@0
|
2950 else c='d';
|
wolffd@0
|
2951 end
|
wolffd@0
|
2952 fprintf(fid,'%% %s[%s] ',m,c);
|
wolffd@0
|
2953 end
|
wolffd@0
|
2954 fprintf(fid,'%% \n');
|
wolffd@0
|
2955 end
|
wolffd@0
|
2956 end
|
wolffd@0
|
2957
|
wolffd@0
|
2958 % level 4
|
wolffd@0
|
2959 if level>3,
|
wolffd@0
|
2960 fprintf(fid,'%% Training history\n');
|
wolffd@0
|
2961 for i=1:t,
|
wolffd@0
|
2962 sT = sS.trainhist(i);
|
wolffd@0
|
2963 fprintf(fid,'%% * Algorithm: %8s Data: %13s Trainlen: %8d\n',...
|
wolffd@0
|
2964 sT.algorithm,sT.data_name,sT.trainlen);
|
wolffd@0
|
2965 %if i>1,
|
wolffd@0
|
2966 fprintf(fid,'%% Neighborh: %8s Mask: ',sT.neigh);
|
wolffd@0
|
2967 for i = 1:dim-1, fprintf(fid,'%% %d ',sT.mask(i)); end;
|
wolffd@0
|
2968 fprintf(fid,'%% %d\n',sT.mask(mdim));
|
wolffd@0
|
2969 fprintf(fid,'%% Radius: %4.2f->%4.2f Alpha: %5.3f (%s)\n', ...
|
wolffd@0
|
2970 sT.radius_ini,sT.radius_fin,sT.alpha_ini,sT.alpha_type);
|
wolffd@0
|
2971 %end
|
wolffd@0
|
2972 fprintf(fid,'%% Time: %s\n',sT.time);
|
wolffd@0
|
2973 end
|
wolffd@0
|
2974 end
|
wolffd@0
|
2975
|
wolffd@0
|
2976 case 'som_data',
|
wolffd@0
|
2977
|
wolffd@0
|
2978 [dlen dim] = size(sS.data);
|
wolffd@0
|
2979 if dlen*dim
|
wolffd@0
|
2980 ind = find(~isnan(sum(sS.data),2));
|
wolffd@0
|
2981 else ind = []; end
|
wolffd@0
|
2982 complete = size(sS.data(ind,:),1);
|
wolffd@0
|
2983 partial = dlen - complete;
|
wolffd@0
|
2984 values = prod(size(sS.data));
|
wolffd@0
|
2985 missing = sum(sum(isnan(sS.data)));
|
wolffd@0
|
2986
|
wolffd@0
|
2987 % level 1
|
wolffd@0
|
2988 fprintf(fid,'%% Struct type : %s\n', sS.type);
|
wolffd@0
|
2989 fprintf(fid,'%% Data name : %s\n', sS.name);
|
wolffd@0
|
2990 fprintf(fid,'%% Vector dimension : %d\n', dim);
|
wolffd@0
|
2991 fprintf(fid,'%% Number of data vectors : %d\n', dlen);
|
wolffd@0
|
2992 fprintf(fid,'%% Complete data vectors : %d\n', complete);
|
wolffd@0
|
2993 fprintf(fid,'%% Partial data vectors : %d\n', partial);
|
wolffd@0
|
2994 if values, r = floor(100 * (values - missing) / values); else r = 0; end
|
wolffd@0
|
2995 fprintf(fid,'%% Complete values : %d of %d (%d%%)\n', ...
|
wolffd@0
|
2996 values-missing, values, r);
|
wolffd@0
|
2997
|
wolffd@0
|
2998 % level 2,
|
wolffd@0
|
2999 status = cell(dim,1);
|
wolffd@0
|
3000 for i=1:dim,
|
wolffd@0
|
3001 n = length(sS.comp_norm{i});
|
wolffd@0
|
3002 if n,
|
wolffd@0
|
3003 uninit = strcmp('uninit',{sS.comp_norm{i}.status});
|
wolffd@0
|
3004 done = strcmp('done',{sS.comp_norm{i}.status});
|
wolffd@0
|
3005 undone = strcmp('undone',{sS.comp_norm{i}.status});
|
wolffd@0
|
3006 if sum(uninit)==n, status{i} = 'no normalization';
|
wolffd@0
|
3007 elseif sum(done)==n, status{i} = 'normalized';
|
wolffd@0
|
3008 elseif sum(undone)==n, status{i} = 'denormalized';
|
wolffd@0
|
3009 else status{i} = 'partial';
|
wolffd@0
|
3010 end
|
wolffd@0
|
3011 else status{i} = 'no normalization'; end
|
wolffd@0
|
3012 end
|
wolffd@0
|
3013 if level>1,
|
wolffd@0
|
3014 fprintf(fid,'%% Vector components\n');
|
wolffd@0
|
3015 D = sS.data;
|
wolffd@0
|
3016 fprintf(fid,'%% # name min mean max std missing status\n');
|
wolffd@0
|
3017 fprintf(fid,'%% --- ------------ ------ ------ ------ ------ ----------- ------\n');
|
wolffd@0
|
3018 for i = 1:dim,
|
wolffd@0
|
3019 known = find(~isnan(D(:,i)));
|
wolffd@0
|
3020 miss = dlen-length(known);
|
wolffd@0
|
3021 fprintf(fid,'%% %-3d %-12s %6.1g %6.1g %6.1g %6.1g %5d (%2d%%) %s\n', ...
|
wolffd@0
|
3022 i,sS.comp_names{i}, ...
|
wolffd@0
|
3023 min(D(known,i)),mean(D(known,i)),max(D(known,i)),std(D(known,i)), ...
|
wolffd@0
|
3024 miss,floor(100*miss/dlen),status{i});
|
wolffd@0
|
3025 end
|
wolffd@0
|
3026 end
|
wolffd@0
|
3027
|
wolffd@0
|
3028 % level 3
|
wolffd@0
|
3029 if level>2,
|
wolffd@0
|
3030 fprintf(fid,'%% Vector component normalizations\n');
|
wolffd@0
|
3031 fprintf(fid,'%% # name method (i=uninit,u=undone,d=done)\n');
|
wolffd@0
|
3032 fprintf(fid,'%% --- ------------ ---------------------------------------\n');
|
wolffd@0
|
3033 for i=1:dim,
|
wolffd@0
|
3034 fprintf(fid,'%% %-3d %-12s ',i,sS.comp_names{i});
|
wolffd@0
|
3035 n = length(sS.comp_norm{i});
|
wolffd@0
|
3036 for j=1:n,
|
wolffd@0
|
3037 m = sS.comp_norm{i}(j).method;
|
wolffd@0
|
3038 s = sS.comp_norm{i}(j).status;
|
wolffd@0
|
3039 if strcmp(s,'uninit'), c='i';
|
wolffd@0
|
3040 elseif strcmp(s,'undone'), c='u';
|
wolffd@0
|
3041 else c='d';
|
wolffd@0
|
3042 end
|
wolffd@0
|
3043 fprintf(fid,'%% %s[%s] ',m,c);
|
wolffd@0
|
3044 end
|
wolffd@0
|
3045 fprintf(fid,'%% \n');
|
wolffd@0
|
3046 end
|
wolffd@0
|
3047 end
|
wolffd@0
|
3048
|
wolffd@0
|
3049 case 'som_topol',
|
wolffd@0
|
3050
|
wolffd@0
|
3051 mdim = length(sS.msize);
|
wolffd@0
|
3052
|
wolffd@0
|
3053 % level 1
|
wolffd@0
|
3054 fprintf(fid,'%% Struct type : %s\n',sS.type);
|
wolffd@0
|
3055 fprintf(fid,'%% Map grid size : ');
|
wolffd@0
|
3056 for i = 1:mdim - 1, fprintf(fid,'%% %d x ',sS.msize(i)); end
|
wolffd@0
|
3057 fprintf(fid,'%% %d\n', sS.msize(mdim));
|
wolffd@0
|
3058 fprintf(fid,'%% Lattice type (rect/hexa) : %s\n', sS.lattice);
|
wolffd@0
|
3059 fprintf(fid,'%% Shape (sheet/cyl/toroid) : %s\n', sS.shape);
|
wolffd@0
|
3060
|
wolffd@0
|
3061 case 'som_train',
|
wolffd@0
|
3062
|
wolffd@0
|
3063 % level 1
|
wolffd@0
|
3064 fprintf(fid,'%% Struct type : %s\n',sS.type);
|
wolffd@0
|
3065 fprintf(fid,'%% Training algorithm : %s\n',sS.algorithm);
|
wolffd@0
|
3066 fprintf(fid,'%% Training data : %s\n',sS.data_name);
|
wolffd@0
|
3067 fprintf(fid,'%% Neighborhood function : %s\n',sS.neigh);
|
wolffd@0
|
3068 fprintf(fid,'%% Mask : ');
|
wolffd@0
|
3069 dim = length(sS.mask);
|
wolffd@0
|
3070 if dim,
|
wolffd@0
|
3071 for i = 1:dim-1, fprintf(fid,'%% %d ',sS.mask(i)); end;
|
wolffd@0
|
3072 fprintf(fid,'%% %d\n',sS.mask(end));
|
wolffd@0
|
3073 else fprintf(fid,'%% \n'); end
|
wolffd@0
|
3074 fprintf(fid,'%% Initial radius : %-6.1f\n',sS.radius_ini);
|
wolffd@0
|
3075 fprintf(fid,'%% Final radius : %-6.1f\n',sS.radius_fin);
|
wolffd@0
|
3076 fprintf(fid,'%% Initial learning rate (alpha) : %-6.1f\n',sS.alpha_ini);
|
wolffd@0
|
3077 fprintf(fid,'%% Alpha function type (linear/inv) : %s\n',sS.alpha_type);
|
wolffd@0
|
3078 fprintf(fid,'%% Training length : %d\n',sS.trainlen);
|
wolffd@0
|
3079 fprintf(fid,'%% Average quantization error : %-6.1f\n',sS.qerror);
|
wolffd@0
|
3080 fprintf(fid,'%% When training was done : %s\n',sS.time);
|
wolffd@0
|
3081
|
wolffd@0
|
3082 case 'som_norm',
|
wolffd@0
|
3083
|
wolffd@0
|
3084 % level 1
|
wolffd@0
|
3085 fprintf(fid,'%% Struct type : %s\n',sS.type);
|
wolffd@0
|
3086 fprintf(fid,'%% Normalization method : %s\n',sS.method);
|
wolffd@0
|
3087 fprintf(fid,'%% Status : %s\n',sS.status);
|
wolffd@0
|
3088
|
wolffd@0
|
3089 % level 2
|
wolffd@0
|
3090 if level>1,
|
wolffd@0
|
3091 fprintf(fid,'%% Parameters:\n');
|
wolffd@0
|
3092 sS.params
|
wolffd@0
|
3093 end
|
wolffd@0
|
3094 end
|
wolffd@0
|
3095 end
|
wolffd@0
|
3096
|
wolffd@0
|
3097 function [] = html2tex(html_addres,texfile)
|
wolffd@0
|
3098
|
wolffd@0
|
3099 tempfile = tempname;
|
wolffd@0
|
3100 fid = fopen(texfile,'w');
|
wolffd@0
|
3101 eval(['!lynx -dump ' html_addres ' > ' tempfile]);
|
wolffd@0
|
3102 fid2 = fopen(tempfile,'r');
|
wolffd@0
|
3103 while not(feof(fid2))
|
wolffd@0
|
3104 line = fgets(fid2);
|
wolffd@0
|
3105 line = strcat('%',line);
|
wolffd@0
|
3106 fprintf(fid,'%s',line);
|
wolffd@0
|
3107 end
|
wolffd@0
|
3108 fclose(fid);
|
wolffd@0
|
3109 fclose(fid2);
|
wolffd@0
|
3110 delete (tempfile);
|
wolffd@0
|
3111
|
wolffd@0
|
3112
|
wolffd@0
|
3113 function [name] = retname
|
wolffd@0
|
3114 resnames = who;
|
wolffd@0
|
3115 if size(resnames,1) > 0
|
wolffd@0
|
3116 max_length = size(resnames{1},2);
|
wolffd@0
|
3117 for index = 1:size(resnames,1)
|
wolffd@0
|
3118 if size(resnames{index},2) > max_length
|
wolffd@0
|
3119 max_length = size(resnames{index},2);
|
wolffd@0
|
3120 end
|
wolffd@0
|
3121 end
|
wolffd@0
|
3122 length = max_length + 1;
|
wolffd@0
|
3123 name(:,1:1:length) = 'A'
|
wolffd@0
|
3124 else
|
wolffd@0
|
3125 name = 'A';
|
wolffd@0
|
3126 end
|
wolffd@0
|
3127 %%
|
wolffd@0
|
3128
|
wolffd@0
|
3129
|
wolffd@0
|
3130
|