fasticag.docx

上传人:b****6 文档编号:6424414 上传时间:2023-01-06 格式:DOCX 页数:20 大小:18.12KB
下载 相关 举报
fasticag.docx_第1页
第1页 / 共20页
fasticag.docx_第2页
第2页 / 共20页
fasticag.docx_第3页
第3页 / 共20页
fasticag.docx_第4页
第4页 / 共20页
fasticag.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

fasticag.docx

《fasticag.docx》由会员分享,可在线阅读,更多相关《fasticag.docx(20页珍藏版)》请在冰豆网上搜索。

fasticag.docx

fasticag

functionfasticag(mixedsig,InitialGuess)

%FASTICAG-FastIndependentComponentAnalysis,theGraphicalUserInterface

%

%FASTICAGgivesagraphicaluserinterfaceforperformingindependent

%componentanalysisbytheFastICApackage.Noargumentsare

%necessaryinthefunctioncall.

%

%Optionalargumentscanbegivenintheform:

%FASTICAG(mixedsig,initialGuess)wherethematrixmixedsigcontainsthe

%multidimensionalsignalsasrowvectors,andinitialGuessgivesthe

%initialvalueforthemixingmatrixusedinthealgorithm.

%

%FASTICAusesthefixed-pointalgorithmdevelopedbyAapoHyvarinen,

%seehttp:

//www.cis.hut.fi/projects/ica/fastica/.TheMatlabpackage

%wasprogrammedbyHugoGavert,JarmoHurri,JaakkoSarela,andAapo

%Hyvarinen.

%

%

%SeealsoFASTICA

%@(#)$Id:

fasticag.m,v1.52005/10/1913:

05:

34jarmoExp$

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Globalvalues

%Handletothismainfigure

globalhf_FastICA_MAIN;

%ChecktoseeifGUIisalreadyrunning

%Can'thavemorethanonecopy-otherwisetheglobal

%variablesandhandlescangetmixedup.

if~isempty(hf_FastICA_MAIN)

error('FastICAGUIalreadyrunning!

');

end

 

%Handlestoothercontrolsinthismainwindow

globalht_FastICA_mixedStatus;

globalht_FastICA_dim;

globalht_FastICA_numOfSamp;

globalht_FastICA_newDim;

globalht_FastICA_whiteStatus;

globalht_FastICA_icaStatus;

globalhpm_FastICA_approach;

globalhe_FastICA_numOfIC;

globalhpm_FastICA_g;

globalhpm_FastICA_stabilization;

%Theseglobalvariablesareusedtostoreallthevalues

%Iusedtousethe'UserData'fieldofcomponents,but

%thatgottoocomplex,soIdecidedtoputeverything

%inglobalvariables

globalg_FastICA_mixedsig;

globalg_FastICA_pca_D;

globalg_FastICA_pca_E;

globalg_FastICA_white_sig;

globalg_FastICA_white_wm;

globalg_FastICA_white_dwm;

globalg_FastICA_ica_sig;

globalg_FastICA_ica_A;

globalg_FastICA_ica_W;

globalg_FastICA_initGuess;

globalg_FastICA_approach;

globalg_FastICA_numOfIC;

globalg_FastICA_g;

globalg_FastICA_finetune;

globalg_FastICA_a1;

globalg_FastICA_a2;

globalg_FastICA_myy;

globalg_FastICA_stabilization;

globalg_FastICA_epsilon;

globalg_FastICA_maxNumIte;

globalg_FastICA_maxFinetune;

globalg_FastICA_sampleSize;

globalg_FastICA_initState;

globalg_FastICA_displayMo;

globalg_FastICA_displayIn;

globalg_FastICA_verbose;

%initialvaluesforthem:

%Alltheinitialvaluesaresethere-evenfor

%variablesthatarenotusedinthisfile

ifnargin<2

g_FastICA_initGuess=1;

%Theuserdidn'tenterinitialguesssowedefault

%backtorandominitialstate.

g_FastICA_initState=1;%seebelowforstringvalues

else

g_FastICA_initGuess=InitialGuess;

%Ifinitialguesswasentered,thentheuserprobably

%wan'ttouseit,eh?

g_FastICA_initState=2;%seebelowforstringvalues

end

ifnargin<1

g_FastICA_mixedsig=[];

else

g_FastICA_mixedsig=mixedsig;%We'llremovemean

end%thefirsttimewe

%usethis.

%GlobalvariableforstoppingtheICAcalculations

globalg_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;%seebelowforstringvalues

g_FastICA_numOfIC=0;

g_FastICA_g=1;%seebelowforstringvalues

g_FastICA_finetune=5;%seebelowforstringvalues

g_FastICA_a1=1;

g_FastICA_a2=1;

g_FastICA_myy=1;

g_FastICA_stabilization=2;%seebelowforstringvalues

g_FastICA_epsilon=0.0001;

g_FastICA_maxNumIte=1000;

g_FastICA_maxFinetune=100;

g_FastICA_sampleSize=1;

g_FastICA_displayMo=1;%seebelowforstringvalues

g_FastICA_displayIn=1;

g_FastICA_verbose=1;%seebelowforstringvalues

%Theseareregardedasconstantsandareusedtostore

%thestringsforthepopupmenusthecurrentvalueis

%seeninthevariablesabove

%D-referstostringsthataredisplayed

%V-referstostringvaluesthatareusedinFPICA

globalc_FastICA_appr_strD;

globalc_FastICA_appr_strV;

globalc_FastICA_g1_strD;

globalc_FastICA_g1_strV;

globalc_FastICA_g2_strD;

globalc_FastICA_g2_strV;

globalc_FastICA_finetune_strD;

globalc_FastICA_finetune_strV;

globalc_FastICA_stabili_strD;

globalc_FastICA_stabili_strV;

globalc_FastICA_iSta_strD;

globalc_FastICA_iSta_strV;

globalc_FastICA_dMod_strD;

globalc_FastICA_dMod_strV;

globalc_FastICA_verb_strD;

globalc_FastICA_verb_strV;

%Allthevaluesforthesearesethere-evenfor

%variablesthatarenotusedinthisfile

c_FastICA_appr_strD='deflation|symmetric';

c_FastICA_appr_strV=['defl';'symm'];

%The'g1'and'g2'belowcorrespondtothevaluesofapproach(1or2)

%DeflationandSymmetricusedtohaveabitdifferentselection

%ofavailablenonlinearities.

c_FastICA_g1_strD='pow3|tanh|gauss|skew';

c_FastICA_g1_strV=['pow3';'tanh';'gaus';'skew'];

c_FastICA_g2_strD='pow3|tanh|gauss|skew';

c_FastICA_g2_strV=['pow3';'tanh';'gaus';'skew'];

c_FastICA_finetune_strD='pow3|tanh|gauss|skew|off';

c_FastICA_finetune_strV=['pow3';'tanh';'gaus';'skew';'off'];

c_FastICA_stabili_strD='on|off';

c_FastICA_stabili_strV=['on';'off'];

c_FastICA_iSta_strD='random|guess';

c_FastICA_iSta_strV=['rand';'guess'];

c_FastICA_dMod_strD='signals|basis|filters|off';

c_FastICA_dMod_strV=['signals';'basis';'filters';'off'];

c_FastICA_verb_strD='on|off';

c_FastICA_verb_strV=['on';'off'];

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Configurationoptions

FIGURENAME='FastICA';

FIGURETAG='f_FastICA';

SCREENSIZE=get(0,'ScreenSize');

FIGURESIZE=[round(0.1*SCREENSIZE(3))(SCREENSIZE(4)-round(0.1*SCREENSIZE(4))-370)530370];

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Createthefigure

a=figure('Color',[0.80.80.8],...

'PaperType','a4letter',...

'Name',FIGURENAME,...

'NumberTitle','off',...

'Tag',FIGURETAG,...

'Position',FIGURESIZE,...

'MenuBar','none');

%Resizinghastobedeniedafterthewindowhasbeencreated-

%otherwisethewindowshowsonlyasatinywindowinWindowsXP.

set(a,'Resize','off');

hf_FastICA_MAIN=a;

set(hf_FastICA_MAIN,'HandleVisibility','callback');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Fromhereonitget'suglyasIhavenothadtimetocleanitup

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Createtheframes

pos_l=2;

pos_w=FIGURESIZE(3)-4;

pos_h=FIGURESIZE(4)-4;

pos_t=FIGURESIZE(4)-2-pos_h;

h_f_background=uicontrol('Parent',a,...

'BackgroundColor',[0.7019610.7019610.701961],...

'Position',[pos_lpos_tpos_wpos_h],...

'Style','frame',...

'Tag','f_background');

pos_l=4;

pos_w=400;

pos_h=106;

pos_t=FIGURESIZE(4)-4-pos_h;

h_f_mixed=uicontrol('Parent',a,...

'BackgroundColor',[0.7019610.7019610.701961],...

'Position',[pos_lpos_tpos_wpos_h],...

'Style','frame',...

'Tag','f_mixed');

pos_h=90;

pos_t=FIGURESIZE(4)-(106+4+2)-pos_h;

h_f_white=uicontrol('Parent',a,...

'BackgroundColor',[0.7019610.7019610.701961],...

'Position',[pos_lpos_tpos_wpos_h],...

'Style','frame',...

'Tag','f_white');

pos_h=pos_t-4-2;

pos_t=4;

h_f_ica=uicontrol('Parent',a,...

'BackgroundColor',[0.7019610.7019610.701961],...

'Position',[pos_lpos_tpos_wpos_h],...

'Style','frame',...

'Tag','f_ica');

pos_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('Parent',a,...

'BackgroundColor',[0.50.50.5],...

'Position',[pos_lpos_tpos_wpos_h],...

'Style','frame',...

'Tag','f_side');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Controlsinf_mixed

bgc=get(h_f_mixed,'BackgroundColor');

pos_vspace=6;

pos_hspace=6;

pos_frame=get(h_f_mixed,'Position');

pos_l=pos_frame

(1)+6;

pos_h=16;

pos_t=pos_frame

(2)+pos_frame(4)-pos_h-6;

pos_w=150;

b=uicontrol('Parent',a,...

'BackgroundColor',bgc,...

'HorizontalAlignment','left',...

'Position',[pos_lpos_tpos_wpos_h],...

'String','Mixedsignals:

',...

'FontWeight','bold',...

'Style','text',...

'Tag','t_mixed');

pos_l=pos_l+pos_w;

pos_w=120;

ht_FastICA_mixedStatus=uicontrol('Parent',a,...

'BackgroundColor',bgc,...

'HorizontalAlignment','left',...

'Position',[pos_lpos_tpos_wpos_h],...

'String','Notloadedyet',...

'Style','text',...

'Tag','t_mixedstatus');

%V鋒鋘v鋖i?

pos_t=pos_t-8;

pos_l=pos_frame

(1)+6;

pos_t=pos_t-pos_h;

pos_w=150;

b=uicontrol('Parent',a,...

'BackgroundColor',bgc,...

'HorizontalAlignment','left',...

'Position',[pos_lpos_tpos_wpos_h],...

'String','Numberofsignals:

',...

'Style','text',...

'Tag','t_2');

pos_l=pos_l+pos_w;

pos_w=50;

ht_FastICA_dim=uicontrol('Parent',a,...

'BackgroundColor',bgc,...

'HorizontalAlignment','left',...

'Position',[pos_lpos_tpos_wpos_h],...

'String','',...

'Style','text',...

'Tag','t_dim');

pos_l=pos_frame

(1)+6;

pos_t=pos_t-pos_h;

pos_w=150;

b=uicontrol('Parent',a,...

'BackgroundColor',bgc,...

'HorizontalAlignment','left',...

'Position',[pos_lpos_tpos_wpos_h],...

'String','Numberofsamples:

',...

'Style','text',...

'Tag','t_3');

pos_l=pos_l+pos_w;

pos_w=50;

ht_FastICA_numOfSamp=uicontrol('Parent',a,...

'BackgroundColor',bgc,...

'HorizontalAlignment','left',...

'Position',[pos_lpos_tpos_wpos_h],...

'String','',...

'Style','text',...

'Tag','t_numOfSamp');

 

%Buttons

pos_l=pos_frame

(1)+pos_hspace;

pos_

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1