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

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function sompak_sammon_gui()
2
3 %SOMPAK_SAMMON_GUI A GUI for using SOM_PAK Sammon's mapping program
4 % from Matlab.
5 %
6 % sompak_sammon_gui
7 %
8 % Launches a GUI which allows the use of SOM_PAK Sammon's mapping
9 % program (sammon) from Matlab. Notice that to use this function, the
10 % SOM_PAK programs must be in your search path, or the variable
11 % 'SOM_PAKDIR' which is a string containing the program path, must be
12 % defined in the workspace. SOM_PAK programs can be found from:
13 % http://www.cis.hut.fi/research/som_lvq_pak.shtml
14 %
15 % See also SOMPAK_SAMMON, SOMPAK_GUI, SOMPAK_INIT_GUI,
16 % SOMPAK_TRAIN_GUI, SOM_GUI.
17
18 % Contributed to SOM Toolbox vs2, February 2nd, 2000 by Juha Parhankangas
19 % Copyright (c) by Juha Parhankangas
20 % http://www.cis.hut.fi/projects/somtoolbox/
21
22 % Juha Parhankangas 050100
23
24 h=findobj(get(0,'Children'),'Tag','SammonGUI');
25
26 if ~isempty(h)
27 figure(h);
28 return;
29 end
30
31
32 a = figure('Color',[0.8 0.8 0.8], ...
33 'PaperType','a4letter', ...
34 'Position',[665 517 175 295], ...
35 'Tag','SammonGUI');
36 b = uicontrol('Parent',a, ...
37 'Units','points', ...
38 'BackgroundColor',[0.701961 0.701961 0.701961], ...
39 'Callback','close gcf', ...
40 'FontWeight','demi', ...
41 'Position',[8 20 50 20], ...
42 'String','CLOSE', ...
43 'Tag','Pushbutton1');
44 b = uicontrol('Parent',a, ...
45 'Units','points', ...
46 'BackgroundColor',[0.701961 0.701961 0.701961], ...
47 'Callback','sompak_rb_control sammon_ok',...
48 'FontWeight','demi', ...
49 'Position',[86 20 50 20], ...
50 'String','OK', ...
51 'Tag','Pushbutton2');
52 b = uicontrol('Parent',a, ...
53 'Units','points', ...
54 'BackgroundColor',[0.701961 0.701961 0.701961], ...
55 'Position',[8 50 130 175], ...
56 'Style','frame', ...
57 'Tag','Frame1');
58 b = uicontrol('Parent',a, ...
59 'Units','points', ...
60 'BackgroundColor',[0.8 0.8 0.8], ...
61 'Position',[12 54 122 40], ...
62 'Style','frame', ...
63 'Tag','Frame2');
64 b = uicontrol('Parent',a, ...
65 'Units','points', ...
66 'BackgroundColor',[0.8 0.8 0.8], ...
67 'FontWeight','demi', ...
68 'HorizontalAlignment','left', ...
69 'Position',[30 78 90 12], ...
70 'String','RUNNING LENGTH', ...
71 'Style','text', ...
72 'Tag','StaticText1');
73 b = uicontrol('Parent',a, ...
74 'Units','points', ...
75 'BackgroundColor',[1 1 1], ...
76 'Callback','sompak_rb_control rlen',...
77 'Position',[48 57 50 20], ...
78 'Style','edit', ...
79 'Tag','RLEN');
80
81 udata.rlen=[];
82
83 b = uicontrol('Parent',a, ...
84 'Units','points', ...
85 'BackgroundColor',[0.8 0.8 0.8], ...
86 'Position',[12 96 122 40], ...
87 'Style','frame', ...
88 'Tag','Frame3');
89 b = uicontrol('Parent',a, ...
90 'Units','points', ...
91 'BackgroundColor',[0.8 0.8 0.8], ...
92 'FontWeight','demi', ...
93 'HorizontalAlignment','left', ...
94 'Position',[33 119 90 12], ...
95 'String','OUTPUT VARIABLE', ...
96 'Style','text', ...
97 'Tag','StaticText2');
98 b = uicontrol('Parent',a, ...
99 'Units','points', ...
100 'BackgroundColor',[1 1 1], ...
101 'Callback','sompak_rb_control out_var',...
102 'Position',[48 99 50 20], ...
103 'String','''ans''', ...
104 'Style','edit', ...
105 'Tag','OUT_VAR');
106
107 udata.out_var='ans';
108
109 b = uicontrol('Parent',a, ...
110 'Units','points', ...
111 'BackgroundColor',[0.8 0.8 0.8], ...
112 'Position',[12 138 122 40], ...
113 'Style','frame', ...
114 'Tag','Frame4');
115 b = uicontrol('Parent',a, ...
116 'Units','points', ...
117 'BackgroundColor',[0.8 0.8 0.8], ...
118 'FontWeight','demi', ...
119 'HorizontalAlignment','left', ...
120 'Position',[43 162 60 12], ...
121 'String','OUTPUT FILE', ...
122 'Style','text', ...
123 'Tag','StaticText3');
124 b = uicontrol('Parent',a, ...
125 'Units','points', ...
126 'BackgroundColor',[1 1 1], ...
127 'Callback','sompak_rb_control out_file',...
128 'Position',[15 141 50 20], ...
129 'Style','edit', ...
130 'Tag','OUT_FILE');
131
132 udata.out_file=[];
133
134 b = uicontrol('Parent',a, ...
135 'Units','points', ...
136 'Callback','sompak_rb_control out_ft',...
137 'FontWeight','demi', ...
138 'HorizontalAlignment','left', ...
139 'Max',3, ...
140 'Min',1, ...
141 'Position',[70 146 62 15], ...
142 'String',{'No File';'mat-file';'cod-file'}, ...
143 'Style','popupmenu', ...
144 'Tag','OUT_FILE_TYPE', ...
145 'Value',1);
146
147 udata.out_file_type='';
148
149 b = uicontrol('Parent',a, ...
150 'Units','points', ...
151 'BackgroundColor',[0.8 0.8 0.8], ...
152 'Position',[12 180 122 40], ...
153 'Style','frame', ...
154 'Tag','Frame5');
155 b = uicontrol('Parent',a, ...
156 'Units','points', ...
157 'BackgroundColor',[0.8 0.8 0.8], ...
158 'FontWeight','demi', ...
159 'HorizontalAlignment','left', ...
160 'Position',[60 203 25 12], ...
161 'String','MAP', ...
162 'Style','text', ...
163 'Tag','StaticText4');
164 b = uicontrol('Parent',a, ...
165 'Units','points', ...
166 'BackgroundColor',[1 1 1], ...
167 'Callback','sompak_rb_control map',...
168 'Position',[15 183 50 20], ...
169 'Style','edit', ...
170 'Tag','MAP');
171
172 udata.map=[];
173
174 b = uicontrol('Parent',a, ...
175 'Units','points', ...
176 'Callback','sompak_rb_control map_ft',...
177 'FontWeight','demi', ...
178 'HorizontalAlignment','left', ...
179 'Max',3, ...
180 'Min',1, ...
181 'Position',[70 188 62 15], ...
182 'String',{'Variable';'mat-file';'cod-file'}, ...
183 'Style','popupmenu', ...
184 'Tag','MAP_TYPE', ...
185 'Value',1);
186
187 udata.map_type='';
188
189 b = uicontrol('Parent',a, ...
190 'Units','points', ...
191 'BackgroundColor',[0.8 0.8 0.8], ...
192 'FontSize',12, ...
193 'FontWeight','demi', ...
194 'Position',[41 230 62 12], ...
195 'String','SAMMON', ...
196 'Style','text', ...
197 'Tag','StaticText5');
198
199
200 set(gcf,'UserData',udata);