[Eeglablist] FFT spectrogram

Alan Velander alanvelander at gmail.com
Tue May 18 10:18:37 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.


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’ %All left sided channels.

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’
%All right sided channels

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

-- 
Alan Velander, MD
917 975 3832
alanvelander at gmail.com


More information about the eeglablist mailing list