%Convert data from EDF to MATLAB form
[header1, data1]=edfread('Subject00_1.edf');
%Sampling rate
Fs=500;
%Channel wise data extraction
data_ch1=data1(1,:);
data_ch1=data_ch1(1:length(data_ch1));
%Fourier Transform
fCoefsF=fft(data_ch1);
amplitude =abs(fCoefsF);
mirror_freq=length(amplitude)/2;
figure(1)
plot(amplitude)
%Manual Removal of higher Frequency
for i=1:length(fCoefsF)
if ((Fs/mirror_freq*i/2)>4) %While extracting the Delta signal(upto 4hz)
fCoefsF(i)=0;
if length(fCoefsF)-i == 0
break;
end
fCoefsF(length(fCoefsF)-i)=0;
else
fCoefsF(i)=fCoefsF(i);
end
end
amplitude=abs(fCoefsF);
figure(2)
plot(amplitude)
%Reconstruct the components of the EEG Signal
%Inverse fourier transform
component_recon=ifft(fCoefsF);
figure(3)
plot(component_recon)
我想从EDF文件中提取EEG组件。下表列出了EEG的组成部分:
Beta-13-> 30 Hz;
我从here获得了帮助。但是我仍然不知道为什么在执行逆向fft时为什么没有恢复信号。
答案 0 :(得分:0)
您可以使用此语法提取著名的乐队(Alpha,beta,theta ...)
p = bandpower(x,fs,freqrange)
示例:p=bandpower(myEEG_channel,512,[0 4])
在此示例中,我们从fs = 512 Hz的EEG信号通道计算出Delta频段功率。