<div dir="ltr"><div class="gmail_default" style="color:#333399">Hello Nicolas, one possible (somewhat naive) approach would be as follows.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">1. Get the list of start and end times from the first set of rejections</div><div class="gmail_default" style="color:#333399">2. Get the list of start and end times for the second set of rejections</div><div class="gmail_default" style="color:#333399">3. Then loop (with matlab code) through the two lists and merge start/end windows so you end up with only one new set of start/end times to reject. One would need to look for windows from lists from Step 1 and 2 which overlap, and merge those windows to be one window. This is relatively simple, with several bookeeping steps in the loop, and several embedded loops. If you are matlab saavy, you might be able to merge the two lists of start/end times in a more efficient coding manner.</div><div class="gmail_default" style="color:#333399">4. Apply the final list to the original data for rejection.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">Note that the issue should be handled in eeglab, and if replicable enter an eeglab bugzilla report, and also a feature request for eeglab developers.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">Also, see if this issue replicates when you do both the first and second rejection steps from the eeglab gui, and let the eeglablist and/or eeglab bugzilla know. Testing with the eeglab GUI and reviewing eegh output may be important for you to understand better what's going on, or whether you are introducing the issue via your (I assume) script/code-only approach.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399"><br></div></div>