[Eeglablist] loop function to extract power spectra from all channels

Deza-Lougovski, Yacila yacila.deza-lougovski at unibw.de
Wed Jun 14 04:17:37 PDT 2023


Dear EEGLAB experts,
In the last part of our analyses, I am trying to loop the following functions, so I will get the absolute gamma power of all the channels of my subjects. Can you help me with the process? So far, I am doing it manually for every channel and every subject, but it is very error prone.


[spectra,freqs] = spectopo(EEG.data(27,:,:), 0, EEG.srate); % Compute power spectrum of channel 27.

 gammaIdx = find(freqs>30 & freqs<80);

 gammaPower = mean(10.^(spectra(gammaIdx)/10)); % Compute absolute power.


Thanks a lot,

Yacila



More information about the eeglablist mailing list