How to get rid of the 1/f in EEG data?
조회 수: 60(최근 30일)
표시 이전 댓글
Iris Milán Maillo 2020년 2월 3일
댓글: ROHAN JAIN 2020년 9월 16일
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)
fitresult = (evoked_power.powspctrm./evoked_power.freq).^p(1); %we use the non-log-transformed data
Any suggestions/ideas on how to continue?
댓글 수: 1
ROHAN JAIN 2020년 9월 16일
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!
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])
댓글 수: 0
Find more on EEG/MEG/ECoG in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!