[Eeglablist] issues importing txt

Arnaud Delorme arno at ucsd.edu
Sun Dec 15 10:06:28 PST 2013


Dear Andrew,

EEGLAB cannot import ASCII files directly with the channels in the first row or column. You have to remove them before importing the data, then add them back using the channel editor.
Best,

Arno

On Dec 12, 2013, at 3:30 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu> wrote:

> 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
> _______________________________________________
> 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/20131215/b9c6e8e1/attachment.html>


More information about the eeglablist mailing list