[Eeglablist] Selecting epochs based on multiple markers

Eric Rawls elrawls at email.uark.edu
Mon Apr 9 10:38:48 PDT 2018


You can easily do this using the pop_selectevent function.

%First epoch around the time-locking event of interest

EEG = pop_epoch( EEG, {'event_code_1'}, [-1  2], 'epochinfo', 'yes');


%Then select only epochs that contain the second event of interest using
the deleteepochs option

EEG = pop_selectevent( EEG, 'type',{'event_code_2'},'deleteevents','off',
'deleteepochs','on');

Eric Rawls
University of Arkansas

On Wed, Apr 4, 2018 at 11:15 PM, Stephen Politzer-Ahles <
politzerahless at gmail.com> wrote:

> There are at least two ways (and probably more that I don't know of) to do
> this. One is to add ERPLAB, which has tools for this kind of boolean epoch
> selection. Another is to write some MATLAB code to rewrite your markers.
> e.g., you can use a loop to iterate through each event, and e.g. if marker
> 1 is followed by marker 2 you rewrite it as '12' (or something like that.
> Then you use pop_epoch and only select the markers that indicate epochs
> with correct responses (12s, 22s, whatever).
>
>
> ---
> Stephen Politzer-Ahles
> The Hong Kong Polytechnic University
> Department of Chinese and Bilingual Studies
> http://www.mypolyuweb.hk/~sjpolit/
> <http://www.nyu.edu/projects/politzer-ahles/>
>
> On Wed, Apr 4, 2018 at 7:44 AM, Tzeng, Tony H. <ttzeng at lsuhsc.edu> wrote:
>
>> Hi all,
>>
>>
>> Is there a way to select epochs based on multiple markers? Ie, I'm trying
>> to select trials  if they have both marker 1 and 2, which would be a
>> correct response. The pop_epoch  seems to be an 'or' function for the
>> values input (or at least, I'm getting an different number of epochs than
>> the expected)?
>>
>>
>> Any advice would be greatly appreciated! Apologies if this is a basic
>> question-I'm a beginner with EEGLab, and I didn't see this answered in the
>> list in the last few years or in the tutorial.
>>
>>
>> Thanks for your patience!
>>
>>
>> Best,
>>
>> Tony Tzeng
>>
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
>> sd.edu
>> For digest mode, send an email with the subject "set digest mime" to
>> eeglablist-request at sccn.ucsd.edu
>>
>
>
> _______________________________________________
> 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/20180409/d689b2f6/attachment.html>


More information about the eeglablist mailing list