📄 gui_cb.m
字号:
switch g_ICA_name case '' msgbox('请先选择算法','提示'); case 'jada_ICA' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here %gui_cb Whiten; g_FastICA_mixedsig=baihua(g_FastICA_mixedsig); end set(ht_FastICA_icaStatus,'String','Computing...'); % The possible values for g depend on approach eval(['g_str = c_FastICA_g' int2str(g_FastICA_approach) '_strV;']); % We'll contruct a command string which we'll later on evaluate... % This is where the Fixed point algorithm is used. command_str = ['g_FastICA_ica_W = jadeR(g_FastICA_mixedsig);']; % If the user wants to plot while computing... % let's at least plot it to the right figure then if ~strcmp(deblank(c_FastICA_dMod_strV(g_FastICA_displayMo,:)),'off') handle = findobj('Tag','f_FastICA_ica'); % Check if the window is already if isempty(handle) % open. If not then open it. figure('Tag', 'f_FastICA_ica', ... 'Name', 'jada_ICA算法: Plot ICs', ... 'NumberTitle', 'off'); else figure(handle); clf; % clear the figure for next plots end end % ... and so let's do it... eval(command_str); % Also notice that in this version if there was something wrong in FPICA % Then the results are []. if ~isempty(g_FastICA_ica_W) % Add the mean back in. g_FastICA_ica_sig = g_FastICA_ica_W * g_FastICA_mixedsig; disp('jada_ICA.......'); mplot(g_FastICA_ica_sig); set (ht_FastICA_icaStatus,'String','Done'); else gui_cb NullICA; % set icasig=[] and do what ever needs to be done then end if ~(g_FastICA_interrupt) gui_cb EnableButtons; end else% fprintf('Data not loaded yet!\n\n'); msgbox('请先加载混合信号','提示'); end%**************************************************************** case 'ogwe_ICA' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here %gui_cb Whiten; g_FastICA_mixedsig=baihua(g_FastICA_mixedsig); end set(ht_FastICA_icaStatus,'String','Computing...'); % The possible values for g depend on approach eval(['g_str = c_FastICA_g' int2str(g_FastICA_approach) '_strV;']); % We'll contruct a command string which we'll later on evaluate... % This is where the Fixed point algorithm is used. command_str = ['g_FastICA_ica_W = ogwe(g_FastICA_mixedsig);']; % If the user wants to plot while computing... % let's at least plot it to the right figure then if ~strcmp(deblank(c_FastICA_dMod_strV(g_FastICA_displayMo,:)),'off') handle = findobj('Tag','f_FastICA_ica'); % Check if the window is already if isempty(handle) % open. If not then open it. figure('Tag', 'f_FastICA_ica', ... 'Name', 'ogwe_ICA算法: Plot ICs', ... 'NumberTitle', 'off'); else figure(handle); clf; % clear the figure for next plots end end % ... and so let's do it... eval(command_str); % Also notice that in this version if there was something wrong in FPICA % Then the results are []. if ~isempty(g_FastICA_ica_W) % Add the mean back in. g_FastICA_ica_sig = g_FastICA_ica_W * g_FastICA_mixedsig; disp('ogwe_ICA.......'); mplot(g_FastICA_ica_sig); set (ht_FastICA_icaStatus,'String','ogwe_ICA has Done'); else gui_cb NullICA; % set icasig=[] and do what ever needs to be done then end if ~(g_FastICA_interrupt) gui_cb EnableButtons; end else% fprintf('Data not loaded yet!\n\n'); msgbox('请先加载混合信号','提示'); end %*********************************************************** case 'Pearson_ICA' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here %gui_cb Whiten; g_FastICA_mixedsig=baihua(g_FastICA_mixedsig); end set(ht_FastICA_icaStatus,'String','Computing...'); % The possible values for g depend on approach eval(['g_str = c_FastICA_g' int2str(g_FastICA_approach) '_strV;']); % We'll contruct a command string which we'll later on evaluate... % This is where the Fixed point algorithm is used. command_str = ['[g_FastICA_ica_sig,g_FastICA_ica_A,g_FastICA_ica_W] = Pearson_ica(g_FastICA_mixedsig);']; % If the user wants to plot while computing... % let's at least plot it to the right figure then if ~strcmp(deblank(c_FastICA_dMod_strV(g_FastICA_displayMo,:)),'off') handle = findobj('Tag','f_FastICA_ica'); % Check if the window is already if isempty(handle) % open. If not then open it. figure('Tag', 'f_FastICA_ica', ... 'Name', 'Pearson_ICA算法: Plot ICs', ... 'NumberTitle', 'off'); else figure(handle); clf; % clear the figure for next plots end end % ... and so let's do it... eval(command_str); % Also notice that in this version if there was something wrong in FPICA % Then the results are []. if ~isempty(g_FastICA_ica_W) % Add the mean back in. %****************临时注释掉**************************** %g_FastICA_ica_sig = g_FastICA_ica_W * g_FastICA_mixedsig; disp('Pearson_ICA.......'); mplot(g_FastICA_ica_sig); set (ht_FastICA_icaStatus,'String','ogwe_ICA has Done'); else gui_cb NullICA; % set icasig=[] and do what ever needs to be done then end if ~(g_FastICA_interrupt) gui_cb EnableButtons; end else% fprintf('Data not loaded yet!\n\n'); msgbox('请先加载混合信号','提示'); end%************************* case 'shibbs_ICA' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here %gui_cb Whiten; g_FastICA_mixedsig=baihua(g_FastICA_mixedsig); end set(ht_FastICA_icaStatus,'String','Computing...'); % The possible values for g depend on approach eval(['g_str = c_FastICA_g' int2str(g_FastICA_approach) '_strV;']); % We'll contruct a command string which we'll later on evaluate... % This is where the Fixed point algorithm is used. command_str = ['g_FastICA_ica_W = shibbsR(g_FastICA_mixedsig);']; % If the user wants to plot while computing... % let's at least plot it to the right figure then if ~strcmp(deblank(c_FastICA_dMod_strV(g_FastICA_displayMo,:)),'off') handle = findobj('Tag','f_FastICA_ica'); % Check if the window is already if isempty(handle) % open. If not then open it. figure('Tag', 'f_FastICA_ica', ... 'Name', 'shibbs_ICA算法: Plot ICs', ... 'NumberTitle', 'off'); else figure(handle); clf; % clear the figure for next plots end end % ... and so let's do it... eval(command_str); % Also notice that in this version if there was something wrong in FPICA % Then the results are []. if ~isempty(g_FastICA_ica_W) % Add the mean back in. g_FastICA_ica_sig = g_FastICA_ica_W * g_FastICA_mixedsig; disp('shibbs_ICA.......'); mplot(g_FastICA_ica_sig); set (ht_FastICA_icaStatus,'String','ogwe_ICA has Done'); else gui_cb NullICA; % set icasig=[] and do what ever needs to be done then end if ~(g_FastICA_interrupt) gui_cb EnableButtons; end else% fprintf('Data not loaded yet!\n\n'); msgbox('请先加载混合信号','提示'); end%********************************************* case 'EGLD_ICA' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here %gui_cb Whiten; g_FastICA_mixedsig=baihua(g_FastICA_mixedsig); end set(ht_FastICA_icaStatus,'String','Computing...'); % The possible values for g depend on approach eval(['g_str = c_FastICA_g' int2str(g_FastICA_approach) '_strV;']); % We'll contruct a command string which we'll later on evaluate... % This is where the Fixed point algorithm is used. command_str = ['g_FastICA_ica_W = shibbsR(g_FastICA_mixedsig);']; % If the user wants to plot while computing... % let's at least plot it to the right figure then if ~strcmp(deblank(c_FastICA_dMod_strV(g_FastICA_displayMo,:)),'off') handle = findobj('Tag','f_FastICA_ica'); % Check if the window is already if isempty(handle) % open. If not then open it. figure('Tag', 'f_FastICA_ica', ... 'Name', 'EGLD_ICA算法: Plot ICs', ... 'NumberTitle', 'off'); else figure(handle); clf; % clear the figure for next plots end end % ... and so let's do it... eval(command_str); % Also notice that in this version if there was something wrong in FPICA % Then the results are []. if ~isempty(g_FastICA_ica_W) % Add the mean back in. g_FastICA_ica_sig = g_FastICA_ica_W * g_FastICA_mixedsig; disp('EGLD_ICA.......'); mplot(g_FastICA_ica_sig); set (ht_FastICA_icaStatus,'String','EGLD_ICA has Done'); else gui_cb NullICA; % set icasig=[] and do what ever needs to be done then end if ~(g_FastICA_interrupt) gui_cb EnableButtons; end else% fprintf('Data not loaded yet!\n\n'); msgbox('请先加载混合信号','提示'); end %%************************************************* case '自然梯度' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here %gui_cb Whiten; g_FastICA_mixedsig=baihua(g_FastICA_mixedsig); end set(ht_FastICA_icaStatus,'String','Computing...'); % The possible values for g depend on approach eval(['g_str = c_FastICA_g' int2str(g_FastICA_approach) '_strV;']); % We'll contruct a command string which we'll later on evaluate... % This is where the Fixed point algorithm is used. command_str = ['g_FastICA_ica_sig = ngica(g_FastICA_mixedsig);']; % If the user wants to plot while computing... % let's at least plot it to the right figure then if ~strcmp(deblank(c_FastICA_dMod_strV(g_FastICA_displayMo,:)),'off') handle = findobj('Tag','f_FastICA_ica'); % Check if the window is already if isempty(handle) % open. If not then open it. figure('Tag', 'f_FastICA_ica', ... 'Name', '自然梯度: Plot ICs', ... 'NumberTitle', 'off'); else figure(handle); clf; % clear the figure for next plots end end % ... and so let's do it... eval(command_str); % Also notice that in this version if there was something wrong in FPICA % Then the results are []. if ~isempty(g_FastICA_ica_sig) % Add the mean back in. % g_FastICA_ica_sig = g_FastICA_ica_W * g_FastICA_mixedsig; disp('自然梯度算法.......'); mplot(g_FastICA_ica_sig); set (ht_FastICA_icaStatus,'String','自然梯度算法 has Done'); else gui_cb NullICA; % set icasig=[] and do what ever needs to be done then end if ~(g_FastICA_interrupt) gui_cb EnableButtons; end else% fprintf('Data not loaded yet!\n\n'); msgbox('请先加载混合信号','提示'); end %%******************************************************* case '全局最优' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here %gui_cb Whiten; g_FastICA_mixedsig=baihua(g_FastICA_mixedsig); end set(ht_FastICA_icaStatus,'String','Computing...'); % The possible values for g depend on approach eval(['g_str = c_FastICA_g' int2str(g_FastICA_approach) '_strV;']); % We'll contruct a command string which we'll later on evaluate... % This is where the Fixed point algorithm is used. command_str = ['g_FastICA_ica_sig = Inde(g_FastICA_mixedsig);']; % If the user wants to plot while computing... % let's at least plot it to the right figure then if ~strcmp(deblank(c_FastICA_dMod_strV(g_FastICA_displayMo,:)),'off') handle = findobj('Tag','f_FastICA_ica'); % Check if the window is already if isempty(handle) % open. If not then open it. figure('Tag', 'f_FastICA_ica', ... 'Name', '全局最优: Plot ICs', ... 'NumberTitle', 'off'); else figure(handle); clf; % clear the figure for next plots end end % ... and so let's do it... eval(command_str); % Also notice that in this version if there was something wrong in FPICA % Then the results are []. if ~isempty(g_FastICA_ica_sig) % Add the mean back in. % g_FastICA_ica_sig = g_FastICA_ica_W * g_FastICA_mixedsig; disp('全局最优算法.......'); mplot(g_FastICA_ica_sig); set (ht_FastICA_icaStatus,'String','全局最优算法 has Done'); else gui_cb NullICA; % set icasig=[] and do what ever needs to be done then end if ~(g_FastICA_interrupt) gui_cb EnableButtons; end else% fprintf('Data not loaded yet!\n\n'); msgbox('请先加载混合信号','提示'); end %%******************************************************* %%******************************************************* case '长短滤波' if ~isempty(g_FastICA_mixedsig) gui_cb DisableButtons; g_FastICA_interrupt = 0; if isempty(g_FastICA_white_sig) % We need the whitened signal here
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -