📄 preprocess.m
字号:
function preprocess(sData,arg2)%PREPROCESS A GUI for data preprocessing.%% preprocess(sData)%% preprocess(sData)%% Launches a preprocessing GUI. The optional input argument can be% either a data struct or a struct array of such. However, primarily% the processed data sets are loaded to the application using the% tools in the GUI. Also, the only way to get the preprocessed data% sets back into the workspace is to use the tools in the GUI (press% the button DATA SET MANAGEMENT).% % For a more throughout description, see online documentation.% See also SOM_GUI. %%%%%%%%%%%% DETAILED DESCRIPTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IN FILES: preprocess.html,preproc.jpg,sDman.jpg,clip.jpg,delay.jpg,window.jpg,selVect.jpg% Contributed to SOM Toolbox vs2, February 2nd, 2000 by Juha Parhankangas% Copyright (c) by Juha Parhankangas and the SOM Toolbox team% http://www.cis.hut.fi/projects/somtoolbox/% Juha Parhankangas 050100global no_of_sc % every Nth component in 'relative values' is drawn stronger.no_of_sc=5;if nargin < 1 | nargin > 2 error('Invalid number of input arguments'); return;end if nargin == 1, arg2=[]; endif ~isstr(sData) %%% Preprocess is started...data.LOG{1}='% Starting the ''Preprocess'' -window...';data.LOG{2}=cat(2,'preprocess(',... sprintf('%s);',inputname(1)));pre_h=findobj(get(0,'Children'),'Tag','Preprocess');if ~isempty(pre_h) figure(pre_h); msgbox('''Preprocess''-figure already exists.'); return;endh0 = figure('Color',[0.8 0.8 0.8], ... 'PaperPosition',[18 180 576 432], ... 'PaperUnits','points', ... 'Position',[595 216 600 775], ... 'Tag','Preprocess'); h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.015 0.06064516129032258 0.9550000000000001 0.1458064516129032], ... 'Style','text', ... 'Tag','StaticText1');data.results_h = h1;h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess close', ... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.8067 0.0142 0.1667 0.0348],... 'String','CLOSE', ... 'Tag','Pushbutton1');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.01833333333333333 0.2141935483870968 0.07000000000000001 0.01806451612903226], ... 'String','LOG', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess sel_comp',... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.7983333333333333 0.2090322580645161 0.1666666666666667 0.03483870967741935], ... 'String',' ', ... 'Style','popupmenu', ... 'Tag','sel_comp_h', ... 'Value',1);data.sel_comp_h=h1;h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[1 1 1], ... 'ListboxTop',0, ... 'Position',[0.0183 0.2568 0.2133 0.1290], ... 'Style','text', ... 'Tag','StaticText3');data.sel_cdata_h=h1;h1 = axes('Parent',h0, ... 'CameraUpVector',[0 1 0], ... 'CameraUpVectorMode','manual', ... 'Color',[1 1 1], ... 'Position',[0.2583 0.2568 0.2133 0.1290], ... 'Tag','Axes1', ... 'XColor',[0 0 0], ... 'XTickLabel',['0 ';'0.5';'1 '], ... 'XTickLabelMode','manual', ... 'XTickMode','manual', ... 'YColor',[0 0 0], ... 'YTickMode','manual', ... 'ZColor',[0 0 0]);data.sel_chist_h=h1;h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[0.4960629921259843 -0.08080808080808044 9.160254037844386], ... 'Tag','Axes1Text4', ... 'VerticalAlignment','cap');set(get(h2,'Parent'),'XLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[-0.0551181102362206 0.4848484848484853 9.160254037844386], ... 'Rotation',90, ... 'Tag','Axes1Text3', ... 'VerticalAlignment','baseline');set(get(h2,'Parent'),'YLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','right', ... 'Position',[-1.2283 5.7980 9.1603], ... 'Tag','Axes1Text2', ... 'Visible','off');set(get(h2,'Parent'),'ZLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[0.4960629921259843 1.070707070707071 9.160254037844386], ... 'Tag','Axes1Text1', ... 'VerticalAlignment','bottom');set(get(h2,'Parent'),'Title',h2);h1 = axes('Parent',h0, ... 'CameraUpVector',[0 1 0], ... 'CameraUpVectorMode','manual', ... 'Color',[0.7529 0.7529 0.7529], ... 'Position',[0.4950000000000001 0.2567741935483871 0.4766666666666667 0.1290322580645161], ... 'Tag','Axes2', ... 'XColor',[0 0 0], ... 'XTickMode','manual', ... 'YColor',[0 0 0], ... 'YTick',[0 0.5 1], ... 'YTickMode','manual', ... 'ZColor',[0 0 0]);data.vector_h=h1;h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[0.4982456140350879 -0.08080808080808044 9.160254037844386], ... 'Tag','Axes2Text4', ... 'VerticalAlignment','cap');set(get(h2,'Parent'),'XLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[-0.1018 0.4848 9.1603], ... 'Rotation',90, ... 'Tag','Axes2Text3', ... 'VerticalAlignment','baseline');set(get(h2,'Parent'),'YLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','right', ... 'Position',[-1.045614035087719 5.797979797979799 9.160254037844386], ... 'Tag','Axes2Text2', ... 'Visible','off');set(get(h2,'Parent'),'ZLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[0.4982456140350879 1.070707070707071 9.160254037844386], ... 'Tag','Axes2Text1', ... 'VerticalAlignment','bottom');set(get(h2,'Parent'),'Title',h2);h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.01833333333333333 0.3922580645161291 0.17 0.01806451612903226], ... 'String','STATISTICS', ... 'Style','text', ... 'Tag','StaticText4');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.2583333333333334 0.3922580645161291 0.1633333333333333 0.01806451612903226], ... 'String','HISTOGRAM', ... 'Style','text', ... 'Tag','StaticText5');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontWeight','demi',... 'FontSize',6,... 'HorizontalAlignment','left',... 'String',{'LEFT: NEW SELECTION';'RIGHT: ADD TO SELECTION'}, ... 'ListboxTop',0, ... 'Position',[0.5016666666666667 0.38 0.235 0.03741935483870968], ... 'Style','text', ... 'Tag','StaticText6', ... 'UserData','[ ]');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess selall', ... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.8066666666666668 0.3922580645161291 0.1666666666666667 0.03483870967741935], ... 'String','SELECT ALL', ... 'Tag','Pushbutton2', ... 'UserData','[ ]');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.7529 0.7529 0.7529], ... 'Position',[0.01833333333333333 0.4503225806451613 0.23 0.3225806451612903], ... 'String',' ', ... 'Style','listbox', ... 'Tag','Listbox1', ... 'Value',1);data.comp_names_h=h1;h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[1 1 1], ... 'Position',[0.4950000000000001 0.4503225806451613 0.2333333333333333 0.3225806451612903], ... 'String',' ', ... 'Style','listbox', ... 'Tag','Listbox2', ... 'Value',1);data.vect_mean_h = h1;h1 = axes('Parent',h0, ... 'CameraUpVector',[0 1 0], ... 'CameraUpVectorMode','manual', ... 'Color',[1 1 1], ... 'Position',[0.7383333333333334 0.4503225806451613 0.2333333333333333 0.3225806451612903], ... 'Tag','Axes3', ... 'XColor',[0 0 0], ... 'XTickMode','manual', ... 'YColor',[0 0 0], ... 'YTickMode','manual', ... 'ZColor',[0 0 0]);data.sel_cplot_h = h1;h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[0.4964028776978418 -0.03212851405622486 9.160254037844386], ... 'Tag','Axes3Text4', ... 'VerticalAlignment','cap');set(get(h2,'Parent'),'XLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[-0.05035971223021596 0.493975903614458 9.160254037844386], ... 'Rotation',90, ... 'Tag','Axes3Text3', ... 'VerticalAlignment','baseline');set(get(h2,'Parent'),'YLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','right', ... 'Position',[-3.1942 1.7028 9.1603], ... 'Tag','Axes3Text2', ... 'Visible','off');set(get(h2,'Parent'),'ZLabel',h2);h2 = text('Parent',h1, ... 'Color',[0 0 0], ... 'HandleVisibility','off', ... 'HorizontalAlignment','center', ... 'Position',[0.4964028776978418 1.028112449799197 9.160254037844386], ... 'Tag','Axes3Text1', ... 'VerticalAlignment','bottom');set(get(h2,'Parent'),'Title',h2);h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess plxy', ... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.265 0.4683870967741936 0.125 0.03483870967741935], ... 'String','XY-PLOT', ... 'Tag','Pushbutton3');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess hist', ... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.265 0.5303225806451613 0.125 0.03483870967741935], ... 'String','HISTOGRAM', ... 'Tag','Pushbutton4');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess bplo', ... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.265 0.5922580645161291 0.125 0.03483870967741935], ... 'String','BOX PLOT', ... 'Tag','Pushbutton5');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess plot', ... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.265 0.654195483870968 0.125 0.03483870967741935], ... 'String','PLOT', ... 'Tag','Pushbutton6');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[1 1 1], ... 'ListboxTop',0, ... 'Position',[0.4088888888888889 0.5333333333333333 0.06 0.03268817204301075], ... 'String','30', ... 'Style','edit', ... 'Tag','EditText1');data.no_of_bins_h = h1;h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.01833333333333333 0.775483870967742 0.2016666666666667 0.01806451612903226], ... 'String','COMPONENT LIST', ... 'Style','text', ... 'Tag','StaticText7');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.4950000000000001 0.775483870967742 0.1966666666666667 0.01806451612903226], ... 'String','AVERAGE', ... 'Style','text', ... 'Tag','StaticText8');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.7383333333333334 0.775483870967742 0.225 0.01806451612903226], ... 'String','RELATIVE VALUES', ... 'Style','text', ... 'Tag','StaticText9');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontSize',10, ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.01833333333333333 0.8154838709677419 0.2033333333333333 0.0232258064516129], ... 'String','COMPONENTS', ... 'Style','text', ... 'Tag','StaticText10');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontSize',10, ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ... 'ListboxTop',0, ... 'Position',[0.4950000000000001 0.8154838709677419 0.2 0.0232258064516129], ... 'String','VECTORS', ... 'Style','text', ... 'Tag','StaticText11');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ... 'Callback','preprocess sD_management', ... 'FontSize',5, ... 'FontWeight','demi', ... 'ListboxTop',0, ... 'Position',[0.01833333333333333 0.8503225806451613 0.1666666666666667 0.03483870967741935], ... 'String','DATA SET MANAGEMENT', ... 'Tag','Pushbutton7');h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'Callback','preprocess sel_sD', ... 'ListboxTop',0, ... 'Position',[0.01833333333333333 0.8890322580645161 0.1666666666666667 0.03483870967741935], ... 'String',' ', ... 'Style','popupmenu', ... 'Tag','PopupMenu2', ... 'Value',1);data.sD_set_h = h1;h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[1 1 1], ... 'ListboxTop',0, ... 'Position',[0.2516666666666667 0.8503225806451613 0.7216666666666667 0.07354838709677419], ... 'Style','text', ... 'Tag','StaticText12');data.sD_name_h = h1;h1 = uicontrol('Parent',h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'FontSize',10, ... 'FontWeight','demi', ... 'HorizontalAlignment','left', ...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -