<div dir="ltr">Dear Bethel,<div><br></div><div>I look at the code and yes I agree with you.</div><div>I have reported it to the developer. Thank you for investigating it!</div><div><br></div><div>Makoto </div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">2014-03-31 11:42 GMT-07:00 Bethel Osuagwu <span dir="ltr"><<a href="mailto:b.osuagwu.1@research.gla.ac.uk" target="_blank">b.osuagwu.1@research.gla.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Tomek,<br>
<br>
I have had a look at the function pop_rejspec() and it is quite weird on how it takes input. On EEGLAB 12.0.2.5b  and probably on other versions, if you look for the lines inside the function pop_rejspec() that goes  thus:<br>


<br>
if exist('reject') ~= 1<br>
    reject = 1;<br>
end;<br>
<br>
This code is looking for a variable 'reject' that does not exist! therefore 'reject' is always set to 1 resulting in the trials being rejected. A work arround would be to change this thus:<br>
<br>
if exist('reject') ~= 1<br>
    reject = 0; % %%% edited by me%%%%<br>
end;<br>
<br>
and then run your command thus:<br>
<br>
EEG=pop_rejspec(EEG,1,[1:EEG.nbchan-5],-100,30,25,45,0,0);<br>
<br>
And that should produce the desired result.<br>
<br>
Thanks<br>
Bethel<br>
<br>
<br>
________________________________________<br>
From: <a href="mailto:eeglablist-bounces@sccn.ucsd.edu">eeglablist-bounces@sccn.ucsd.edu</a> [<a href="mailto:eeglablist-bounces@sccn.ucsd.edu">eeglablist-bounces@sccn.ucsd.edu</a>] On Behalf Of Tomek Ligęza [<a href="mailto:tsl@poczta.fm">tsl@poczta.fm</a>]<br>


Sent: 28 March 2014 13:53<br>
To: Tyler Grummett<br>
Cc: <a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><br>
Subject: Re: [Eeglablist] Problem with marking data epoch for rejection (Tomek Ligeza)<br>
<div class=""><br>
Thanks for your reply.<br>
The pop_autorej function is based on abnormally distributed data.<br>
My problem is that I want to use the spectral estimates method as my goal is to mark muscle activity (artifacts in 25-45 Hz frequency window).<br>
<br>
So let me be more specific:<br>
How can I call pop_rejspec function from matlab command line to mark trials for rejection ?<br>
<br>
As I mentioned before, when I call it from GUI window - everything works fine. But when calling it from command line - trials that should be only marked for rejection - are actually rejected (even though 'eegplotreject' argument = 0)<br>


Because I want to have a code for my script, I need to call this function from the command line (not from the GUI).<br>
<br>
Regards,<br>
Tomek<br>
<br>
<br>
<br>
<br>
Od: "Tyler Grummett" <<a href="mailto:tyler.grummett@flinders.edu.au">tyler.grummett@flinders.edu.au</a>><br>
Do: "Tomek Ligęza" <<a href="mailto:tsl@poczta.fm">tsl@poczta.fm</a>>;<br>
Wysłane: 0:30 Piątek 2014-03-28<br>
Temat: Re: [Eeglablist] Problem with marking data epoch for rejection<br>
<br>
Have a look at the function pop_autorej<br>
<br>
Tyler<br>
<br>
</div><div class="">On 28 Mar 2014, at 8:08 am, "Tomek Ligęza" <<a href="mailto:tsl@poczta.fm">tsl@poczta.fm</a><mailto:<a href="mailto:tsl@poczta.fm">tsl@poczta.fm</a>>> wrote:<br>
<br>
Dear List,<br>
I have an issue regarding rejecting data epochs using spectral estimates.<br>
I need EEGLAB to only mark trials for rejection. Everything works fine when I call the function from the menu: Tools -> Reject data epochs -> Reject by spectra and set "Reject marked trials" field to "NO".<br>


However, when I try the same using the command:<br>
EEG = pop_rejspec( EEG, 1,'elecrange',[1:EEG.nbchan-5] ,'threshold',[-100 30] ,'freqlimits',[25 45] ,'eegplotcom','','eegplotplotallrej',0,'eegplotreject',0);<br>
trials that should be only marked for rejection,  are actually rejected  (despite the fact that the argument ‘eegplotreject’ is equal to zero).<br>
Surprisingly,  this command is copied from eeghistory after calling the function pop_rejspec from menu Tools.<br>
How can I mark trials for rejection using a command?<br>
I would really appreciate your help as I have to use the "command option" in my data analysis.<br>
<br>
Regards,<br>
Tomek Ligeza<br>
Jagiellonian University, Cracow, Poland<br>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
</div>To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><mailto:<a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a>><br>


For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><mailto:<a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a>><br>


<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a></div></div></blockquote></div><br><br clear="all"><div>

<br></div>-- <br><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div>
</div>