[Eeglablist] FFT Spectrogram

Alan Velander alanvelander at gmail.com
Fri May 14 12:40:19 PDT 2021


Dear list members,

I am a new user of EEGLAB and MATLAB, and this is my first post. I am a
clinical neurologist who is researching quantitative EEG measures in
critical care patients. I have used packages like Persyst in the past, but
I am trying to learn more about how Persyst calculates different measures.

Currently, I am trying to reproduce an FFT Spectrogram of an averaged
signal from the Left Hemisphere and an averaged signal from the Right
Hemisphere. See this link for the commercial version of the FFT Spectrogram
versus my preliminary attempt:
https://urldefense.com/v3/__https://docs.google.com/document/d/1S_0mJIACwWgw2fhCZc6oEtRCHoujxHDLukxwAh39q9I/edit?usp=sharing__;!!Mih3wA!XMdFEoZWioGVE568H0tS7bG6hVVhTueAbtzgjPTxnupF_tGPBkO3DTqqFFGunwhnAM6X3g$ 


I preprocessed the 256 Hz EEG file as recommended in the tutorial. The EEG
is now an array with 21 channels (19 EEG, 8 right, 8 left, 3 center, and 2
ECG).

I then created an average signal of each hemisphere and a spectrogram of
each average signal.

EEG.data(22,:)=(EEG.data(1,:)+EEG.data(3,:)+EEG.data(6,:)+EEG.data(8,:)+EEG.data(11,:)+EEG.data(13,:)+EEG.data(16,:)+EEG.data(18,:))/8;
EEG.chanlocs(22).labels=‘Av_L’

EEG.data(23,:)=(EEG.data(2,:)+EEG.data(4,:)+EEG.data(7,:)+EEG.data(9,:)+EEG.data(12,:)+EEG.data(14,:)+EEG.data(17,:)+EEG.data(19,:))/8;EEG.chanlocs(23).labels=‘Av_R’

I used the spectrogram function to plot the power spectral densities of
Av_L and Av_R. I wanted a window of 30 s, used the default noverlap,
evaluated the entire interval of the EEG, sampled at 256 Hz, and changed
frequency to the y axis with limits on the c and y axes.

spectrogram(EEG.data(22,:),(30*256),[],313856,256,'yaxis'); caxis([0
20]);ylim([0 20]); colormap jet

spectrogram(EEG.data(23,:),(30*256),[],313856,256,'yaxis'); caxis([0
20]);ylim([0 20]); colormap jet

Am I on the right track? Is there some special feature or toolbox of EEGLAB
that would make this entire process easier? Is the average of each channel
from the right and left hemisphere just an average, or is there a more
complicated way to combine the data? Can the power scale be changed from
dB/Hz to uv^2/Hz or sqrt(uV)/Hz?

Again, I apologize if these are newbie questions, and I appreciate any help
you can provide.

Alan



More information about the eeglablist mailing list