# [Eeglablist] Mean frequency for some frequency bands

Arnaud Delorme arno at ucsd.edu
Tue Apr 30 16:51:49 PDT 2019

```Dear Emmanuelle,

Reading the paper and your code, with one minor difference (sum instead of mean and bsxfun, otherwise you will have a dimension mismatch).

indx = find the index of my frequency range of interest
my_spectrum = spectrum(:, indx);
PSD_norm = bsxfun(@rdivide, my_spectrum, sum(my_spectrum, [], 2));
mf = sum(  freqs .* PSD_norm , 2)

Best wishes,

Arno

> On Apr 26, 2019, at 1:30 PM, Emmanuelle Renauld <emmanuelle.renauld.1 at ulaval.ca> wrote:
>
> Hello,
>
> I was reading an article using the "mean frequency" and wasn't sure what it meant. I am used to see information on the alpha peak, but not the "alpha mean frequency".
>
> I found one explanation here, and it happens to be published in my field of study (tDCS). https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4893480/ (See the EEG Mean Frequency section in the Method). Is something like this already in EEGLAB? Would you have any idea how to use it? If I already have my spectrum and freqs, I guess something like this could work?
>
> indx = find the index of my frequency range of interest
> my_spectrum = spectrum(:, indx);
> PSD_norm = my_spectrum./mean(my_spectrum, [], 2);  %for each electrode separatedly
> mf = sum(  freqs .* PSD_norm , 2)  %2 => over the second dimension, result is mf for each electrode.
>
>
> In this article, they use 0-100 Hz to find the mean frequency. However, here, they compute the mean frequency for each frequency band. https://www.ncbi.nlm.nih.gov/pubmed/14724047
>
> Does this measure seem interesting to you, masters of EEG?
>
> Thank you for your input,
>
>
> Emmanuelle
>
>
> ​
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu

```