⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui_s.m

📁 一种很好的Fast ICA算法。根据西安理工大学的一遍硕论文而写有很好的效果。
💻 M
字号:
function gui_s (x, y)%% This file is used by FASTICAG% The save dialog for saving the results% @(#)$Id: gui_s.m,v 1.4 2004/07/27 13:09:26 jarmo Exp $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Global variables% Handle to the windowglobal hf_FastICA_Save;% Handles to some of the controls in windowglobal he_FastICA_suffix;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Configuration optionsFIGURENAME = 'FastICA: Save results';FIGURETAG = 'f_FastICASave';FIGURESIZE = [x y 450 150];%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Check to see if this figure is already open - it should not!% Can't have more than one copy - otherwise the global% variables and handles can get mixed up.if ~isempty(findobj('Tag',FIGURETAG))  error('Error: load dialog already open!');end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Initialize some of the controls' valuessaveString = 'Save results as variables in MATLAB workspace.';promptString = 'Suffix to identify the results:';helpString = 'If you give e.g. ''_FastICA'', the variables will be called A_FastICA, W_FastICA, etc.';%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Create the figurea = figure('Color',[0.8 0.8 0.8], ...	   'PaperType','a4letter', ...	   'Name', FIGURENAME, ...	   'NumberTitle', 'off', ...	   'Tag', FIGURETAG, ...	   'Position', FIGURESIZE, ...	   'MenuBar', 'none');set (a, 'Resize', 'off');hf_FastICA_Save = a;set(hf_FastICA_Save, 'HandleVisibility', 'callback');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From here on it get's ugly as I have not had time to clean it up%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Create the framespos_l=2;pos_w=FIGURESIZE(3)-4;pos_h=FIGURESIZE(4)-4;pos_t=2;h_f_save_background = uicontrol('Parent',a, ...  'BackgroundColor',[0.701961 0.701961 0.701961], ...  'Position',[pos_l pos_t pos_w pos_h], ...  'Style','frame', ...  'Tag','f_save_background');pos_w=120;pos_l=FIGURESIZE(3)-(pos_w+2+2);pos_h=FIGURESIZE(4)-2*4;pos_t=4;h_f_save_side = uicontrol('Parent',a, ...  'BackgroundColor',[0.701961 0.701961 0.701961], ...  'Position',[pos_l pos_t pos_w pos_h], ...  'Style','frame', ...  'Tag','f_save_side');pos_l=4;pos_w=FIGURESIZE(3)-8-pos_w-2;pos_h=FIGURESIZE(4)-8;pos_t=4;h_f_save = uicontrol('Parent',a, ...  'BackgroundColor',[0.701961 0.701961 0.701961], ...  'Position',[pos_l pos_t pos_w pos_h], ...  'Style','frame', ...  'Tag','f_save');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Controls in f_savebgc = get(h_f_save, 'BackgroundColor');pos_w=230;pos_frame=get(h_f_save, 'Position');pos_h = 40;pos_t = pos_frame(2) + pos_frame(4) - pos_h - 6;pos_l = pos_frame(1) + 6;b = uicontrol('Parent',a, ...  'BackgroundColor',bgc, ...  'HorizontalAlignment','left', ...  'Position',[pos_l pos_t pos_w pos_h], ...  'String',saveString, ...  'Style','text', ...  'Tag','t_93');pos_h = 20;pos_t = pos_t - pos_h - 10;pos_l = pos_frame(1) + 6;b = uicontrol('Parent',a, ...  'BackgroundColor',bgc, ...  'HorizontalAlignment','left', ...  'Position',[pos_l pos_t pos_w pos_h], ...  'String',promptString, ...  'Style','text', ...  'Tag','t_92');pos_w = 200;pos_l = pos_l + 30;pos_t = pos_t - pos_h;he_FastICA_suffix = uicontrol('Parent',a, ...  'BackgroundColor',[1 1 1], ...  'HorizontalAlignment','left', ...  'Position',[pos_l pos_t pos_w pos_h], ...  'String','', ...  'Style','edit', ...  'Tag','e_suffix');pos_w = pos_frame(3) - 12;pos_h = 30;pos_t = pos_frame(2) + 6;pos_l = pos_frame(1) + 6;b = uicontrol('Parent',a, ...  'BackgroundColor',bgc, ...  'HorizontalAlignment','left', ...  'Position',[pos_l pos_t pos_w pos_h], ...  'String',helpString, ...  'Style','text', ...  'Tag','t_97');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Controls in f_save_sidepos_vspace = 6;pos_hspace = 10;pos_frame = get(h_f_save_side, 'Position');pos_w = 100;pos_h = 30;pos_l = pos_frame(1) + pos_hspace;pos_t = pos_frame(2) + pos_frame(4) - pos_h - pos_vspace;b = uicontrol('Parent',a, ...  'BackgroundColor',[0.701961 0.701961 0.701961], ...  'Callback','gui_sc Save', ...  'Position',[pos_l pos_t pos_w pos_h], ...  'String','Save', ...  'Tag','b_sSave');pos_t=pos_t-pos_h-pos_vspace;b = uicontrol('Parent',a, ...  'BackgroundColor',[0.701961 0.701961 0.701961], ...  'Callback','gui_sc Cancel', ...  'Position',[pos_l pos_t pos_w pos_h], ...  'String','Cancel', ...  'Tag','b_sCancel');pos_t = pos_frame(2) + pos_vspace;b = uicontrol('Parent',a, ...  'BackgroundColor',[0.701961 0.701961 0.701961], ...  'Callback','gui_sc Help', ...  'Position',[pos_l pos_t pos_w pos_h], ...  'String','Help', ...  'Tag','b_sHelp');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -