Raw EEG signal is decomposed by fastICA method but there have same independent components and I can't understand why they are same. Have there any suggestions for solve this?
7 次查看(过去 30 天)
显示 更早的评论
Code:
%%
clc;
clear
close all;
load B02T.mat;
fs=250;
% t = 0.004:1/fs:1;
eeg1 = data{1,1}.X;
channel_1= eeg1(:,1);
ch_1=channel_1(1:2000);
figure;
subplot(2,1,1);
plot(ch_1);
xlabel('Time (s)');
ylabel('Amplitude');
legend('ch1');
title("Plot channel "+1+ " for Structure 1X1");
hold on;
grid on;
eeg_signal = eeg1(1:2000); % first 2000 samples
subplot(2,1,2);
plot(eeg_signal,'black');
hold on;
grid on;
legend('EEG Signal');
title('Raw EEG Signal');
%%
% Apply ICA
numComponents = 5; % Number of independent components to extract
[icasig, A, W] =fastica (eeg_signal,'numOfIC', numComponents);
% Plot original EEG signals and ICA components
figure;
% Plot original EEG signals
subplot(numComponents + 1, 1, 1);
plot(eeg_signal);
title('Original EEG Signals');
xlim([1, size(eeg_signal, 2)]);
% Plot ICA components
for i = 1:numComponents
subplot(numComponents + 1, 1, i + 1);
plot(icasig(1 , : ));
title(['ICA Component ', num2str(i)]);
xlim([1, size(icasig, 2)]);
end
xlabel('Time');
ylabel('Amplitude');
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 EEG/MEG/ECoG 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!