How to get rid of the 1/f in EEG data?

조회 수: 36 (최근 30일)
Iris Milán Maillo
Iris Milán Maillo 2020년 2월 3일
댓글: ROHAN JAIN 2020년 9월 16일
Hi everyone,
I am not a very experienced user in Matlab. I am doing time-frequency analyses on my EEG data, looking at low frequencies. To do so, I need to get rid of 1/f (pink noise), but I am not sure how to do it. I am using polyfit function to estimate the 1/f slope, but I don't know if I am doing it correctly, and I don't know what to do next. I am following this paper: https://www.sciencedirect.com/science/article/abs/pii/S0306452205011711
Some EEG people using Matlab could help me? I have done the log10 transformation to both the power spectrum and the frequencies of my data. My code is the following:
f = evoked_power_dB.freq(2:212);
x = f
y = mean(eeg_data,1) %mean of the 53 channels - 1x211
p = polyfit(x,y,1)
x1= f(1:211)
yfit=polyval(p,x1)
figure;
plot(x,y,'o')
xlim([0 4])
ylim([-10 20])
hold on
plot(x1,yfit)
fitresult = (evoked_power.powspctrm./evoked_power.freq).^p(1); %we use the non-log-transformed data
Any suggestions/ideas on how to continue?
Thanks,
Iris
  댓글 수: 1
ROHAN JAIN
ROHAN JAIN 2020년 9월 16일
Hi Iris,
If it still remains an open question, I have a little suggestion for you.
Are you fitting 1/f line on the power spectral density or eeg data itself ? Since you are using frequency in X-axis, you should consider log transformed power in Y-axis and there fit the regression line using polyfit as you did.
Hope it helps!

댓글을 달려면 로그인하십시오.

답변 (1개)

Spencer Chen
Spencer Chen 2020년 2월 3일
polyfit() is not for estimating 1/f functions.
Something like this is more appopriate:
fout = fit(x,y,'(a/x)^b','Lower',[0 0])
Blessings,
Spencer

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by