<div dir="ltr">Hello Brittany,<div><br></div><div>You're right that xmax isn't what you're looking for; EEG.xmax gives the last timepoint in the epoch. It sounds like what you want is the number of epochs, which you can get from EEG.trials or size(EEG.data,3). And for datasets with an odd number of trials, you will probably need to round up or down after dividing by 2, since trying to select a non-integer number of epochs will probably cause an error.</div><div><br></div><div>Best,</div><div>Steve</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><br><br></div>Stephen Politzer-Ahles<br>New York University, Abu Dhabi<br>Neuroscience of Language Lab<br><a href="http://www.nyu.edu/projects/politzer-ahles/" target="_blank">http://www.nyu.edu/projects/politzer-ahles/</a><br></div></div></div>
<br><div class="gmail_quote">On Sat, Nov 29, 2014 at 12:17 PM, Brittany Alperin <span dir="ltr"><<a href="mailto:balperin07@gmail.com" target="_blank">balperin07@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"><div><div><div><div><div><div><div><div><div>Hello<br><br></div>I have a series of set files that I want to split in half. They are divided into two second epochs, but each dataset does not have the same number of epochs. What I would like to do is split each file in half. Is there a way to do this and save the two halves?<br><br></div>My roundabout plan was to cut out the first half of the data, save that, reload the original data, cut out the second half of the data, and save that so I would end up with the first half and last half. My issue has been telling the select data function that I want epochs 1 through whatever the half point is. I've used the parameter EEG.xmax to represent the total length of the file, but when I try several different division commands, it doesn't work. I've tried the following with and without parentheses:<br><br></div>1:EEG.xmax/2 <br></div>1:EEG.xmax./2<br></div>1:EEG.xmax.\2<br></div>1:idivide(EEG.xmax,2)<br><br></div>I have a feeling the EEG.xmax might not be the correct command because my data has been epoched.<br><br></div>Anyone have any suggestions?<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Brittany<br></font></span></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></div>