<div dir="ltr">Hi,<div><br></div><div>I'm trying to do manual artifact rejection of continuous data using eegplot, and to later apply those rejections to another EEG object which is the same data except with different filtering. However, I'm having trouble accessing the TMPREJ object which eegplot uses. In debug, I can access it from Base in the Function Call Stack, but I don't seem to be able to otherwise access it, and my current application doesn't seem to be working. Here is what I'm trying to do:</div><div><br></div><div><div>command = '[EEG LASTCOM] = eeg_eegrej(EEG,eegplot2event(TMPREJ));'</div><div>eegplot(EEG.data(1:64,:), 'srate', EEG.srate,  'events', EEG.event, 'command', command);</div><div>unfilt_EEG = eeg_eegrej(unfilt_EEG, eegplot2event(TMPREJ));<br></div><div><br></div><div>My understanding is that the command variable should be applying the rejection of TMPREJ on EEG in eeglab, however I get the following error after pressing the reject button in eegplot:</div><div><div><br></div><div>Undefined function or variable 'EEG'.</div><div> </div><div>Error while evaluating DestroyedObject Callback</div></div><div><br></div><div>And likewise since I haven't been able to figure out how to access TMPREJ, I can't get the subsequent line to work either.</div><div><br></div><div>If anyone has a solution or alternative method, I would be very appreciative.</div><div><br></div><div>Thanks,</div><div>Max</div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div style="font-size:small"><div>Max Cantor<br></div>Graduate Student</div><div style="font-size:small">Cognitive Neuroscience of Language Lab</div><span style="font-size:small">University of Colorado Boulder</span><br></div></div>
</div></div>