[Eeglablist] How can I epoch events that preceded a specific response?

Stephen Politzer-Ahles spa268 at nyu.edu
Tue Aug 4 23:05:05 PDT 2015

Hello Ana,

I think you can find several discussions about this kind of issue on the
EEGLABLIST archives. For example, here's one:
http://sccn.ucsd.edu/pipermail/eeglablist/2012/005176.html. I know I've
responded to others, but I can't remember where they are right now.

Long story short, there are at least two approaches for this:
1) look into ERPLAB, it should have options for more complex trial
definition based on multiple triggers
2) Use a for loop or an arrayfun() to rewrite your triggers based on the
value of the following response codes (e.g., for a trigger called 'A'
followed by a response called '1', you could concatenate the following
response code onto the trigger to end up with a trigger like 'A1');
previous threads on the list should have code snippets.


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

On Tue, Aug 4, 2015 at 7:25 PM, Alves Francisco, A.C. (Ana) <
a.alvesfrancisco at pwo.ru.nl> wrote:

> Dear all,
> I am comparing 2 groups of participants in 4 different conditions (videos
> with different audiovisual asynchronies).
> After each video, the participants were asked to judge whether the video
> just watched was in-sync (S1) or out-of-sync (S2).
> Is there a way of epoching events that were followed by an in-sync
> response separately from the ones that were followed by an out-of-sync
> response?
> I tried the code below for the in-sync responses (S1), without success..
> ep_lim = [-0.8, 2];
> tps = {EEG.event.type};
> corr_tp = find(strcmp('1', tps));
> prev_ev = corr_tp - 1;
> EEG = pop_epoch( EEG, {}, ep_lim, 'eventindices', prev_ev);
> Thank you for your attention!
> ana francisco
> _______________________________________________
> 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/20150805/b85d4d37/attachment.html>

More information about the eeglablist mailing list