[Eeglablist] issues importing txt

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Thu Dec 12 15:30:38 PST 2013


Dear Andrew,

Try this code.

%%%%%%%%%%%%%%%%%%%%%%%%%%

% go to the folder where you have the file to import
input = dir('HW_*.txt');
input = input.name;

% open the file
FID = fopen(input);

% skip the first lines... by the way I found 19 channels, not 21
firstLine = fgetl(FID);

% parse data structure
tmpData = fscanf(FID, '%f');

% reshape
tmpData = reshape(tmpData, [19 length(tmpData)/19]);

% close the file
fclose(FID);

%%%%%%%%%%%%%%%%%%%%%%%%%%

The channels I found in the first line are:
FP1-LE FP2-LE F3-LE F4-LE C3-LE C4-LE P3-LE P4-LE O1-LE O2-LE F7-LE F8-LE
T3-LE T4-LE T5-LE T6-LE Fz-LE Cz-LE Pz-LE

Then import 'tmpData' (which is 19*60000 double) to EEGLAB using import
from variable.

Makoto


2013/12/12 Andrew Hill <andrewhill at ucla.edu>

> Hi - hope someone can give me an idea what I'm doing wrong..   I'm trying
> to import the following txt file:
>
> https://dl.dropboxusercontent.com/u/5590246/HW_EC_12052013.txt.zip
>
> it's about 5mb, and contains 21 channels of data sampled at 200 hz.
>
> currently set up with electrodes as columns, and channel labels included,
> but i've tried importing with transposing electrodes to rows, and also
> tried both with and without labels..
>
> I assumed it would need to be "without labels and transposed", and when
> setting up that way it imports, but only shows 1 single channel (appending
> all electrodes into 1).
>
> any suggestions?
>
>
> thanks,
> andrew
>
>
> _______________________________________________
> 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
>



-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20131212/97e75008/attachment.html>


More information about the eeglablist mailing list