<div dir="ltr"><div>Dear Magda, I use the following lines when I was trying the split-half approach<br><br></div>If you have loaded one dataset<br><div><br>    EEG_even = EEG;<br>    <br>    %se crea el dataset par<br>    [channels samples epochs] = size(EEG.data);<br>
    <br>    EEG_even.data = EEG_even.data(:,:,2:2:epochs);<br>    <br>    [channels samples epochs] = size(EEG_even.data);<br>    <br>    EEG_even.trials = epochs;<br>    <br>    EEG_even.epoch = {};<br>    <br>    [EEG_even,changes] = eeg_checkset(EEG_even);<br>
    <br>    pop_saveset(EEG_even,'filepath',EEG.filepath,'filename',[ EEG.setname '_even.set']);<br>    <br>    EEG_odd = EEG;<br>    <br>    [channels samples epochs] = size(EEG.data);<br>    <br>
    EEG_odd.data = EEG_odd.data(:,:,1:2:epochs);<br>    <br>    [channels samples epochs] = size(EEG_odd.data);<br>    <br>    EEG_odd.trials = epochs;<br>    <br>    EEG_odd.epoch = {};<br>    <br>    [EEG_odd,changes] = eeg_checkset(EEG_odd);<br>
<br>    pop_saveset(EEG_odd,'filepath',EEG.filepath,'filename',[ EEG.setname '_odd.set']);<br><br></div><div>I hope this works for you<br><br></div><div>Best<br></div><div>  <br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 7:42 AM, Magda Gawłowska <span dir="ltr"><<a href="mailto:mag.gawlowska@gmail.com" target="_blank">mag.gawlowska@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Dear EEGlab Users,<div><br></div><div>I'm quite new to Matlab scripting as I was previously using only GUI version of EEGLab. I was wondering if you can help me with scripting problem. I suppose it's not very complicated, but I have a hard time with finding the solution.</div>

<div><br></div><div>So, here we go - I  have segmented datasets with different number of events in each one. I wanted to divide sets into halves and save them as the 1st and the 2nd half. Up until now I've been doing it by simply using: Eidt -> select data -> epoch range, but it takes ages to do it manually. Is there any way to do it using script, so that Matlab checks number of events in every dataset at first, and then takes the 1st and 2nd half separately?</div>

<div><br></div><div>I would be grateful for any help!</div><div><br></div><div>Greetings,</div><div><br></div><div><br></div><div>Magda<br><br>
</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>John Ochoa<br>
Docente de Bioingeniería<br>Universidad de Antioquia<br>
</div>