<div dir="ltr">You can easily do this using the pop_selectevent function.<div><br></div><div><span style="font-family:Courier">%First epoch around the time-locking event of interest<span class="sew2yah8hgbw4q5"></span><span class="sewl13ekfq9hny5"></span></span><br></div><div><p style="margin:0px;line-height:normal;font-family:Courier">EEG = pop_epoch( EEG, {<span style="color:rgb(178,69,243)">'event_code_1</span><span style="color:rgb(178,69,243)">'</span>}, [-1  2], <span style="color:rgb(178,69,243)">'epochinfo'</span>, <span style="color:rgb(178,69,243)">'yes'</span>);</p><p style="margin:0px;line-height:normal;font-family:Courier"><br></p><p style="margin:0px;line-height:normal;font-family:Courier">%Then select only epochs that contain the second event of interest using the deleteepochs option<br></p></div><div><span class="sew2yah8hgbw4q5"></span><span class="sewl13ekfq9hny5"></span><p style="margin:0px;line-height:normal;font-family:Courier;color:rgb(178,69,243)"><span style="color:rgb(0,0,0)">EEG = pop_selectevent( EEG, </span>'type'<span style="color:rgb(0,0,0)">,{</span>'event_code_2'<span style="color:rgb(0,0,0)">},</span>'deleteevents'<span style="color:rgb(0,0,0)">,</span>'off'<span style="color:rgb(0,0,0)">,</span>'deleteepochs'<span style="color:rgb(0,0,0)">,</span>'on');</p></div><div><br></div><div>Eric Rawls</div><div>University of Arkansas<span class="seww3hwb2x6vtw0"></span><span class="sewytqheonvj3cv"></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 4, 2018 at 11:15 PM, Stephen Politzer-Ahles <span dir="ltr"><<a href="mailto:politzerahless@gmail.com" target="_blank">politzerahless@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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). <br></div><div class="gmail_extra"><br clear="all"><div><div class="m_8430956942159887299gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><span><div>---<br></div>Stephen Politzer-Ahles<br>The Hong Kong Polytechnic University<br>Department of Chinese and Bilingual Studies<br><a href="http://www.mypolyuweb.hk/~sjpolit/" target="_blank">http://www.mypolyuweb.hk/~<wbr>sjpolit/</a></span><a href="http://www.nyu.edu/projects/politzer-ahles/" target="_blank"></a></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Wed, Apr 4, 2018 at 7:44 AM, Tzeng, Tony H. <span dir="ltr"><<a href="mailto:ttzeng@lsuhsc.edu" target="_blank">ttzeng@lsuhsc.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">




<div dir="ltr">
<div id="m_8430956942159887299m_-3630574881859002539divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi all,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">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)? </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">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. </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks for your patience!</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best,</p>
<p style="margin-top:0;margin-bottom:0">Tony Tzeng</p>
</div>
</div>

<br></div></div>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/ee<wbr>glabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.uc<wbr>sd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.e<wbr>du</a><br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/<wbr>eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.<wbr>ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.<wbr>edu</a><br></blockquote></div><br></div>