[Eeglablist] eegplot and TMPREJ

Max Cantor Max.Cantor at colorado.edu
Fri May 5 11:13:25 PDT 2017


I had a feeling that I was going to need to use global variables, but was
not sure how to do so. I will try writing it into my code as you've shown,
thank you! Likewise, I was definitely planning on saving those rejections
for exactly the reasons you've mentioned.

Thanks!
Max

On Friday, May 5, 2017, Benedikt Ehinger <behinger at uos.de> wrote:

> Hi Max,
>
> the eegplot-rejection method is really not nice to use.
> The solution I use, uses global variables
>
> global rej
> eegplot(EEG.data,'srate',EEG.srate,'winlength',8, ...
>         'events',EEG.event,'wincolor',[1 0.5 0.5], ...
>         'command','global rej,rej=TMPREJ',...
>         'eloc_file',EEG.chanlocs);
>
> tmprej = eegplot2event(rej, -1);
> [EEG,~] = eeg_eegrej(EEG,tmprej(:,[3 4]));
>
> It is a very good idea to save this "rej"-variable. You might want
> re-clean or re-apply the cleaning later!
>
> Best,
> Benedikt
>
> Am 04.05.2017 um 18:21 schrieb Max Cantor:
> > Hi,
> >
> > 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:
> >
> > command = '[EEG LASTCOM] = eeg_eegrej(EEG,eegplot2event(TMPREJ));'
> > eegplot(EEG.data(1:64,:), 'srate', EEG.srate,  'events', EEG.event,
> > 'command', command);
> > unfilt_EEG = eeg_eegrej(unfilt_EEG, eegplot2event(TMPREJ));
> >
> > 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:
> >
> > Undefined function or variable 'EEG'.
> >
> > Error while evaluating DestroyedObject Callback
> >
> > 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.
> >
> > If anyone has a solution or alternative method, I would be very
> > appreciative.
> >
> > Thanks,
> > Max
> >
> >
> >
> > --
> > Max Cantor
> > Graduate Student
> > Cognitive Neuroscience of Language Lab
> > University of Colorado Boulder
> >
> >
> > _______________________________________________
> > Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> > To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu <javascript:;>
> > For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu <javascript:;>
> >
>


-- 
Max Cantor
Graduate Student
Cognitive Neuroscience of Language Lab
University of Colorado Boulder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170505/9c80a252/attachment.html>


More information about the eeglablist mailing list