[Eeglablist] How can I epoch events followed by correct response only?

Mikołaj Magnuski imponderabilion at gmail.com
Fri Oct 3 15:42:11 PDT 2014


Hej Rafał,

I think the most straightforward way would be to find event indices that
are followed by events marking correct response. Then you can use these
event indices to epoch the data.

If your correct response events are of type '1' (EEG.event.type) as you
suggest you can try the following:

% set the epoching limis:
ep_lim = [-0.2, 0.7];
% look for 'correct' markers:
tps = {EEG.event.type};
corr_tp = find(strcmp('1', tps));
% the following step assumes that all correct responses are preceded with
events that you want to epoch you data with, this may not necassarily be
the case
prev_ev = corr_tp - 1;
% epoch with respect to event just before correct markers:


EEG = pop_epoch( EEG, {}, ep_lim, 'eventindices', prev_ev);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20141004/138cc28f/attachment.html>


More information about the eeglablist mailing list