<span id="mailbox-conversation">Yeah doesn't seem like there are any built-in functions.<div><br></div>
<div>Your suggestion helps a bit. However I need to extract the peak from each epoch. So I guess I have to loop over it. </div>
<div><br></div>
<div>What does the squeeze() do. I looked on the matlab help but the explanation is not helpful to me at all. </div>
<div><br></div>
<div>B</div></span><div class="mailbox_signature">--<br>Bastien Boutonnet, Ph.D.<br>Department of Psychology<br>University of Wisonsin, Madison<br>bastienboutonnet.com<br><br>Sent from my iPhone, apologies for thumb-induced typos. </div>
<br><br><div class="gmail_quote"><p>On Thu, Mar 6, 2014 at 11:27 PM, Stephen Politzer-Ahles <span dir="ltr"><<a href="mailto:politzerahless@gmail.com" target="_blank">politzerahless@gmail.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><p>Hello Bastien,
<br><br>I don't know about built-in functions for this, but if there isn't
<br>one, extracting them with MATLAB is fairly straightforward anyway. For
<br>each participant you can run something like this:
<br><br>baseline = 200; % length of pre-stimulus baseline in ms, assuming 1000
<br>Hz sampling rate
<br>window = [300 500]; % let's say you want to extract the mean from 300-500 ms
<br>values = EEG.data(:, (window(1)+baseline+1):(window(2)+baseline+1),
<br>:); % pull out the time window
<br>values = squeeze( mean( values, 2 ) ); % average over samples
<br><br>Then you have a vector consisting of the mean amplitudes for each trial.
<br><br>Best,
<br>Steve
<br><br><br>Stephen Politzer-Ahles
<br>New York University, Abu Dhabi
<br>Neuroscience of Language Lab
<br>http://www.nyu.edu/projects/politzer-ahles/
<br><br><br>On Wed, Mar 5, 2014 at 10:36 AM, Bastien Boutonnet <bastien.b1@gmail.com> wrote:
<br>> Dear all,
<br>>
<br>> It will be my first attempt to look at ERPs in terms of single-trials. In
<br>> the first instance I was wondering if anyone had a suggestion regarding the
<br>> following:
<br>>
<br>> I would like to extract a time point (or rather a mean of close time points)
<br>> for each trial, which I wish to correlate/regress with a continuous
<br>> variable. I tried to look if there was a function already doing that kind of
<br>> thing but I was out of luck. 1. Was my search badly done and there IS in
<br>> fact a function? 2. My search was done correctly, there is no ready-made
<br>> function and I will have to “manually” extract the information. If so, what
<br>> could I do? Has anyone done something slightly similar?
<br>>
<br>> Thanks in advance for your time.
<br>>
<br>> Bastien
<br>>
<br>> —
<br>> Bastien Boutonnet, Ph. D.
<br>> Department of Psychology
<br>> University of Wisconsin, Madison
<br>> bastienboutonnet.com
<br>>
<br>> _______________________________________________
<br>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
<br>> To unsubscribe, send an empty email to eeglablist-unsubscribe@sccn.ucsd.edu
<br>> For digest mode, send an email with the subject "set digest mime" to
<br>> eeglablist-request@sccn.ucsd.edu
<br></p></blockquote></div><br>