<div dir="ltr"><div><div><div><div><div>Hi Carlos,<br><br></div>The MATLAB function randsample() can get random numbers. So you could use that, in combination with the pop_rejepoch() function, to randomly remove some epochs. If you want to do this many times, just use a 'for' loop to repeat it over and over again.<br>
<br></div>num_epochs = size(EEG.data, 3); % Find the number of epochs<br></div>num_toreject = 5; % Some number of epochs to reject per file; you can set this to any integer you want<br></div>epochs_to_reject = randsample( 1:num_epochs, num_to_reject ) % Get some random epoch indices (without replacement)<br>
EEG = pop_rejepoch( EEG, epochs_to_reject, 0 ); % remove those epochs<br><br></div>Best,<br>Steve<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 9, 2013 at 8:44 AM, Carlos CEVALLOS <span dir="ltr"><<a href="mailto:ccevallo@ulb.ac.be" target="_blank">ccevallo@ulb.ac.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">Good Day<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In order to analyze files in a study it needs epoch consistency so I am looking for a way of rejecting epochs randomly. I have already rejected bad epochs but now I have to make all data point consistent with each other. Could you help me with a script or an advise on how could I do this? <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks in advance,<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial","sans-serif"">Carlos CEVALLOS<u></u><u></u></span></p></font></span></div></div><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><br></blockquote></div><br><br clear="all"><br>-- <br>Stephen Politzer-Ahles<br>
University of Kansas<br>Linguistics Department<br><a href="http://people.ku.edu/~sjpa/" target="_blank">http://people.ku.edu/~sjpa/</a>
</div>