How to get rid of the 1/f in EEG data?
34 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
ROHAN JAIN
el 16 de Sept. de 2020
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!
Respuestas (1)
Spencer Chen
el 3 de Feb. de 2020
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
0 comentarios
Ver también
Categorías
Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!