[Eeglablist] Value of alphaIdx in code for extracting power of frequency bands

Celia Andreu Sanchez Celia.Andreu at uab.cat
Thu Mar 2 07:14:33 PST 2023


Hi!


Following the already famous code for extracting power of frequency bands:


[spectra,freqs] = spectopo(EEG.data(2,:,:), 0, EEG.srate);

alphaIdx = find(freqs>8 & freqs<13);

alphaPower = mean(10.^(spectra(alphaIdx)/10));



I found that when I check the alphaIdx, it does not include all the numbers between 8 and 13.


In alphaIdx = find(freqs>8 & freqs<13);

The saved alphaIdx is: [10; 11; 12; 13]


When alphaIdx   = find(freqs>=8 & freqs<=12);           % alpha=8-12

The saved alphaIdx is: [9; 10; 11; 12; 13]


The same happens with the rest (deltaIdx, thetaIdx, betaIdx, gammaIdx).

Is that ok?


Thanks,

Celia.



More information about the eeglablist mailing list