<div dir="ltr"><div><span style="font-size:12.8px">Hi EEGers</span></div><span style="font-size:12.8px"><div><span style="font-size:12.8px"><br></span></div>I'm running into an error when I segment, remove the baseline using pop_rmbase, and reject bad trials.  I am trying to use the entire epoch as the baseline.  It works fine for most conditions, but when I come to a condition that only has a single instance of condition I run into this error (see end of message).  I went through using the gui and it looks like it is only a problem when I have a single instance of a condition.  My experimental setup will have several times of single trials within a condition because I want to combine them at a later time in different ways.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">How can I get around this error?  Why does it have a problem with a single trial (what is the indexing)?  Is it related to taking the whole epoch as the baseline?  </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks for your help!</div><div style="font-size:12.8px"><div><br></div><div><br><div>Here's the error:</div><div><div>pop_rmbase(): Removing baseline...</div><div>Subscripted assignment dimension mismatch.</div><div><br></div><div>Error in eegthresh (line 108)</div><div><span style="white-space:pre-wrap">    </span>elec(indexe,:) = ( sigmin < negthresh(indexe) ) | ( sigmax ></div><div>        posthresh(indexe) );</div><div><br></div><div>Error in pop_eegthresh (line 154)</div><div><span style="white-space:pre-wrap">       </span>[Itmp Irej NS Erejtmp] = eegthresh( EEG.data, EEG.pnts, elecrange,</div><div>        negthresh, posthresh, [EEG.xmin EEG.xmax], starttime, endtime);</div></div></div><div><br></div><div><br></div><div>Here is the code I'm trying to run:</div><div><div>EEG = pop_epoch( EEG, {  conditionname  }, [-0.8         1.5], 'newname', [subject,conditionname], 'epochinfo', 'yes');</div><div>[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'savenew', outputFile, 'gui', 'off'); </div><div>EEG = eeg_checkset( EEG );</div><div>EEG = pop_rmbase( EEG, [-800    1500]);</div><div>[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);</div><div>EEG = eeg_checkset( EEG );</div><div>EEG = pop_eegthresh(EEG,1,[1:65] ,-100,100,-0.8,1.296,0,1);</div><div>EEG = pop_rejtrend(EEG,1,[1:65] ,525,50,0.3,0,1,0);</div><div>[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'savenew', artifactrejectedoutputFile, 'gui', 'off'); </div><div>EEG = eeg_checkset( EEG ); </div></div><div><br></div><div><br></div><div>Thanks for any insight,</div><div>Liz</div><div><br></div></div></div>