[Eeglablist] Save EEG epochs in different files

Stephen Politzer-Ahles politzerahless at gmail.com
Sun Oct 16 12:17:20 PDT 2016


Dear Alberto,

I don't think there's a built-in EEGLAB function for this, but it will be
straightforward to do with basic MATLAB functions. Just depends on the file
format you want. An EEG epoch is just a matrix of numbers (for example, if
you had 30 channels and sampled at 1000 Hz, then a 2-second epoch is a
30x2000 sample matrix). MATLAB has functions like dlmwrite() that can be
used to write a matrix out to a text file. After that it's just a matter of
putting the function in a for loop to save each epoch one at a time.

Best,
Steve


---
Stephen Politzer-Ahles
The Hong Kong Polytechnic University
Department of Chinese and Bilingual Studies
http://www.mypolyuweb.hk/~sjpolit/
<http://www.nyu.edu/projects/politzer-ahles/>

On Thu, Oct 13, 2016 at 5:41 PM, Alberto Cacciola <
alberto.cacciola0 at gmail.com> wrote:

> Dear all,
>
> First of all, sorry if my question can be stupid. I searched on the
> previous messages of the mailing list but couldn't manage to find any
> solutions,
>
> I am new with EEGlab. I splitted a resting state EEG in 2-s epochs as
> follow:
>
> EEG = eeg_regepochs(EEG, 'recurrence', 2, 'limits', [0 2], 'rmbase', NaN);
>
> and didn't encounter any problems.
> Now I would like to save each epoch as a different file. For Instance, if
> I have 90 epochs of 2sec I would save each of the epoch as a .txt or .asc
> file, thus resulting in 90 independent files.
> Is it possible? How should I proceed?
>
> Many thanks for your help
> Alberto
>
>
>
>
> _______________________________________________
> 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/20161017/244f9652/attachment.html>


More information about the eeglablist mailing list