<div dir="ltr"><div><div><div><div><div><div><div><div><div>Good Afternoon,<br><br></div>I'm trying to merge three set files and then average them across trials and later by time slice. <br><br></div>I'm able to load the data using raw_data = pop_loadset('filename',file_names,'filepath',ROOT_DIR);<br></div>and then merge the sets using averaged_set = pop_mergeset(raw_data, linspace(1,numel(raw_data), numel(raw_data) ), 0);<br><br></div>I then average it using averaged_set.data = mean(averaged_set.data,3);<br>and set the number of trials to be 1 using averaged_set.trials = 1;<br><br></div>When I try to time select the data using selection = pop_select(averaged_set,'time',[0 0.5]); I get the following <br><br>Warning: negative minimum time; unchanged to ensure correct latency of initial boundary event<br>eeg_insertbound(): 1 boundary (break) events added.<br>eeg_checkset warning: 42/44 events had out-of-bounds latencies and were removed<br>eeg_insertbound(): 1 boundary (break) events added.<br>BUG 1971 WARNING: IF YOU ARE USING A SCRIPT WITTEN FOR A PREVIOUS VERSION OF<br>EEGLAB TO CALL THIS FUNCTION, BECAUSE YOU ARE REJECTING THE ONSET OF THE DATA,<br>EVENTS WERE CORRUPTED. EVENT LATENCIES ARE NOW CORRECT (SEE <a href="https://sccn.ucsd.edu/wiki/EEGLAB_bug1971">https://sccn.ucsd.edu/wiki/EEGLAB_bug1971</a>);<br>Warning: Discrepency when recomputing event latency.<br>Try to reproduce the problem and send us your dataset <br>> In eeg_eegrej at 155<br>  In pop_select at 537 <br><br></div>but selection = pop_select(raw_data(1),'time',[0 0.5]); works fine so I'm suspicious I'm doing something wrong with the merging or averaging.<br><br></div>Any suggestions are greatly appreciated.<br><br></div>Sincerely,<br></div>Harold Hodgins<br></div>