# [Eeglablist] Window of integration

Arnaud Delorme arno at salk.edu
Wed Jan 26 17:09:28 PST 2005

Dear Tom,

>Please may ask if there are functions to do this method for calculating
>amplitudes in a given range in EEGLAB?
>
>
There is no such function in EEGLAB but if you write it, we will be glad
to integrate it.

>Alternatively, please is there a simple way to access the data structures
>that store the ERPs used by pop_plotdata()?
>
>
The ERP can be calculated using this simple command

erp = mean(EEG.data,3);

(3 indicating that the average has to be performed on the 3rd dimension
of the data array which contains all the singles trials). To plot the
ERP for the first data channel, type

figure; plot(EEG.times, erp);

% The area between 62.5 and 67.5 ms could calculated using
[tmp ind1] =min( abs( EEG.times - 62.5 ) ); % closest time index to 62.5 ms
[tmp ind2] =min( abs( EEG.times - 67.5 ) ); % closest time index to 67.5 ms

erp_interval = sum(erp(:, ind1:ind2));

% if you want to smooth the data prior to computing the sum (filter
below 30 Hz), type in
erp_smooth = eeg_filt(erp, EEG.srate, 0, 30);
erp_interval = sum(erp_smooth(:, ind1:ind2));

Hope this help,

Arno

--

*Arnaud Delorme, Ph.D.*
Swartz Center for Computational Neuroscience, INC, University of San
Diego California
La Jolla, CA92093-0961, USA

*Tel* :/(+1)-858-458-1927 ext 15/
*Fax* :/(+1)-858-458-1847/
*Web page*: sccn.ucsd.edu/~arno <http://www.sccn.ucsd.edu/%7Earno>
*To think upon*:

If the book we are reading does not wake us, as with a fist
hammering on our skull, why then do we read it? A book must be an
ice-axe to break the sea frozen inside us.

/Frank Kafka/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20050126/134f1082/attachment.htm