[Eeglablist] extracting single-trial values

Stephen Politzer-Ahles politzerahless at gmail.com
Thu Mar 6 21:26:59 PST 2014

Hello Bastien,

I don't know about built-in functions for this, but if there isn't
one, extracting them with MATLAB is fairly straightforward anyway. For
each participant you can run something like this:

baseline = 200; % length of pre-stimulus baseline in ms, assuming 1000
Hz sampling rate
window = [300 500]; % let's say you want to extract the mean from 300-500 ms
values = EEG.data(:, (window(1)+baseline+1):(window(2)+baseline+1),
:); % pull out the time window
values = squeeze( mean( values, 2 ) ); % average over samples

Then you have a vector consisting of the mean amplitudes for each trial.


Stephen Politzer-Ahles
New York University, Abu Dhabi
Neuroscience of Language Lab

On Wed, Mar 5, 2014 at 10:36 AM, Bastien Boutonnet <bastien.b1 at gmail.com> wrote:
> Dear all,
> It will be my first attempt to look at ERPs in terms of single-trials. In
> the first instance I was wondering if anyone had a suggestion regarding the
> following:
> I would like to extract a time point (or rather a mean of close time points)
> for each trial, which I wish to correlate/regress with a continuous
> variable. I tried to look if there was a function already doing that kind of
> thing but I was out of luck. 1. Was my search badly done and there IS in
> fact a function? 2. My search was done correctly, there is no ready-made
> function and I will have to “manually” extract the information. If so, what
> could I do? Has anyone done something slightly similar?
> Thanks in advance for your time.
> Bastien
>> Bastien Boutonnet, Ph. D.
> Department of Psychology
> University of Wisconsin, Madison
> bastienboutonnet.com
> _______________________________________________
> 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

More information about the eeglablist mailing list