[Eeglablist] splitting a set file in half
Stephen Politzer-Ahles
spa268 at nyu.edu
Sun Nov 30 14:49:22 PST 2014
Hello Brittany,
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.
Best,
Steve
Stephen Politzer-Ahles
New York University, Abu Dhabi
Neuroscience of Language Lab
http://www.nyu.edu/projects/politzer-ahles/
On Sat, Nov 29, 2014 at 12:17 PM, Brittany Alperin <balperin07 at gmail.com>
wrote:
> Hello
>
> 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?
>
> 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:
>
> 1:EEG.xmax/2
> 1:EEG.xmax./2
> 1:EEG.xmax.\2
> 1:idivide(EEG.xmax,2)
>
> I have a feeling the EEG.xmax might not be the correct command because my
> data has been epoched.
>
> Anyone have any suggestions?
>
> Brittany
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20141201/eb5ca7f5/attachment.html>
More information about the eeglablist
mailing list