[Eeglablist] extracting single-trial values

Bastien Boutonnet bastien.b1 at gmail.com
Fri Mar 7 07:37:49 PST 2014

```Yeah doesn't seem like there are any built-in functions.

Your suggestion helps a bit. However I need to extract the peak from each epoch. So I guess I have to loop over it.

What does the squeeze() do. I looked on the matlab help but the explanation is not helpful to me at all.

B
--
Bastien Boutonnet, Ph.D.
Department of Psychology
bastienboutonnet.com

Sent from my iPhone, apologies for thumb-induced typos.

On Thu, Mar 6, 2014 at 11:27 PM, Stephen Politzer-Ahles
<politzerahless at gmail.com> wrote:

> 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.
> Best,
> Steve
> Stephen Politzer-Ahles
> New York University, Abu Dhabi
> Neuroscience of Language Lab
> http://www.nyu.edu/projects/politzer-ahles/
> 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?
>>
>>
>> Bastien
>>
>> —
>> Bastien Boutonnet, Ph. D.
>> Department of Psychology
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140307/cfa04f86/attachment.html>
```