annotate toolboxes/MIRtoolbox1.3.2/somtoolbox/sompak_sammon_gui.m @ 0:cc4b1211e677 tip

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