1、if isempty(hf_FastICA_MAIN) error(FastICA GUI already running!);end% Handles to other controls in this main windowglobal ht_FastICA_mixedStatus;global ht_FastICA_dim;global ht_FastICA_numOfSamp;global ht_FastICA_newDim;global ht_FastICA_whiteStatus;global ht_FastICA_icaStatus;global hpm_FastICA_appr
2、oach;global he_FastICA_numOfIC;global hpm_FastICA_g;global hpm_FastICA_stabilization;% These global variables are used to store all the values% I used to use the UserData field of components, but% that got too complex, so I decided to put everything% in global variablesglobal g_FastICA_mixedsig;glob
3、al g_FastICA_pca_D;global g_FastICA_pca_E;global g_FastICA_white_sig;global g_FastICA_white_wm;global g_FastICA_white_dwm;global g_FastICA_ica_sig;global g_FastICA_ica_A;global g_FastICA_ica_W;global g_FastICA_initGuess;global g_FastICA_approach;global g_FastICA_numOfIC;global g_FastICA_g;global g_F
4、astICA_finetune;global g_FastICA_a1;global g_FastICA_a2;global g_FastICA_myy;global g_FastICA_stabilization;global g_FastICA_epsilon;global g_FastICA_maxNumIte;global g_FastICA_maxFinetune;global g_FastICA_sampleSize;global g_FastICA_initState;global g_FastICA_displayMo;global g_FastICA_displayIn;gl
5、obal g_FastICA_verbose;% initial values for them:% All the initial values are set here - even for% variables that are not used in this fileif nargin 2 g_FastICA_initGuess = 1; % The user didnt enter initial guess so we default % back to random initial state. g_FastICA_initState = 1; % see below for
6、string valueselse g_FastICA_initGuess = InitialGuess; % If initial guess was entered, then the user probably % want to use it, eh? g_FastICA_initState = 2; 1 g_FastICA_mixedsig = ; g_FastICA_mixedsig = mixedsig; % Well remove meanend % the first time we % use this.% Global variable for stopping the
7、ICA calculationsglobal g_FastICA_interrupt;g_FastICA_pca_D = ;g_FastICA_pca_E = ;g_FastICA_white_sig = ;g_FastICA_white_wm = ;g_FastICA_white_dwm = ;g_FastICA_ica_sig = ;g_FastICA_ica_A = ;g_FastICA_ica_W = ;g_FastICA_approach = 1;g_FastICA_numOfIC = 0;g_FastICA_g = 1;g_FastICA_finetune = 5;g_FastIC
8、A_a1 = 1;g_FastICA_a2 = 1;g_FastICA_myy = 1;g_FastICA_stabilization = 2;g_FastICA_epsilon = 0.0001;g_FastICA_maxNumIte = 1000;g_FastICA_maxFinetune = 100;g_FastICA_sampleSize = 1;g_FastICA_displayMo = 1;g_FastICA_displayIn = 1;g_FastICA_verbose = 1;% These are regarded as constants and are used to s
9、tore% the strings for the popup menus the current value is% seen in the variables above% D - refers to strings that are displayed% V - refers to string values that are used in FPICAglobal c_FastICA_appr_strD;global c_FastICA_appr_strV;global c_FastICA_g1_strD;global c_FastICA_g1_strV;global c_FastIC
10、A_g2_strD;global c_FastICA_g2_strV;global c_FastICA_finetune_strD;global c_FastICA_finetune_strV;global c_FastICA_stabili_strD;global c_FastICA_stabili_strV;global c_FastICA_iSta_strD;global c_FastICA_iSta_strV;global c_FastICA_dMod_strD;global c_FastICA_dMod_strV;global c_FastICA_verb_strD;global c
11、_FastICA_verb_strV;% All the values for these are set here - even forc_FastICA_appr_strD = deflation|symmetric;c_FastICA_appr_strV = deflsymm;% The g1 and g2 below correspond to the values of approach (1 or 2)% Deflation and Symmetric used to have a bit different selection% of available nonlineariti
12、es.c_FastICA_g1_strD = pow3|tanh|gauss|skewc_FastICA_g1_strV = pow3tanhgausskewc_FastICA_g2_strD = c_FastICA_g2_strV = c_FastICA_finetune_strD = pow3|tanh|gauss|skew|offc_FastICA_finetune_strV = off c_FastICA_stabili_strD = on|offc_FastICA_stabili_strV = on offc_FastICA_iSta_strD = random|guessc_Fas
13、tICA_iSta_strV = rand guessc_FastICA_dMod_strD = signals|basis|filters|offc_FastICA_dMod_strV = signalsbasis filtersc_FastICA_verb_strD = c_FastICA_verb_strV = % Configuration optionsFIGURENAME = FastICAFIGURETAG = f_FastICASCREENSIZE = get(0,ScreenSizeFIGURESIZE = round(0.1*SCREENSIZE(3) (SCREENSIZ
14、E(4)-round(0.1*SCREENSIZE(4)-370) 530 370;% Create the figurea = figure(Color,0.8 0.8 0.8, . PaperType,a4letter, .Name, FIGURENAME, .NumberTitle, Tag, FIGURETAG, .Position, FIGURESIZE, .MenuBarnone% Resizing has to be denied after the window has been created -% otherwise the window shows only as a t
15、iny window in Windows XP.set (a, Resizehf_FastICA_MAIN = a;set(hf_FastICA_MAIN, HandleVisibilitycallback% From here on it gets 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=FIGURESIZE(4)-2-pos_h;h_f_background = uicontrol(Paren
16、t,a, .BackgroundColor,0.701961 0.701961 0.701961, .,pos_l pos_t pos_w pos_h, .Styleframef_backgroundpos_l=4;pos_w=400;pos_h=106;pos_t=FIGURESIZE(4)-4-pos_h;h_f_mixed = uicontrol(f_mixedpos_h=90;pos_t=FIGURESIZE(4)-(106+4+2)-pos_h;h_f_white = uicontrol(f_whitepos_h=pos_t - 4 - 2;pos_t=4;h_f_ica = uic
17、ontrol(f_icapos_w=120;pos_l=FIGURESIZE(3)-(pos_w+2+2);pos_h=FIGURESIZE(4)-2*4;pos_t=FIGURESIZE(4)-(4)-pos_h;h_f_side = uicontrol(,0.5 0.5 0.5, .f_side% Controls in f_mixedbgc = get(h_f_mixed, pos_vspace = 6;pos_hspace = 6;pos_frame=get(h_f_mixed, pos_l = pos_frame(1) + 6;pos_h = 16;pos_t = pos_frame
18、(2) + pos_frame(4) - pos_h - 6;pos_w = 150;b = uicontrol(,bgc, .HorizontalAlignmentleftStringMixed signals:FontWeightboldtextt_mixedpos_l = pos_l + pos_w;pos_w = 120;ht_FastICA_mixedStatus = uicontrol(Not loaded yett_mixedstatus% V鋒鋘 v鋖i?pos_t = pos_t - 8;pos_t = pos_t - pos_h;Number of signals:t_2pos_w = 50;ht_FastICA_dim = uicontrol(t_dimNumber of samples:t_3ht_FastICA_numOfSamp = uicontrol(t_numOfSamp% Buttonspos_l = pos_frame(1) + pos_hspace;pos_
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1