[Eeglablist] save .edf file

Parker, Christopher christopher.parker.10 at ucl.ac.uk
Wed Jul 9 07:47:34 PDT 2014


Dear EEGLab users,


If you want to read/write EEG files to disk, you can use these functions posted on Mathworks.


http://www.mathworks.co.uk/matlabcentral/fileexchange/36530-read---write-edf+-files/content/lab_write_edf.m


The EEGLab writing functions don't work for me.


Chris



________________________________
From: Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
Sent: 08 July 2014 17:47
To: Parker, Christopher; Ramón Martinez
Cc: eeglablist at sccn.ucsd.edu
Subject: Re: [Eeglablist] save .edf file

Dear Ramon,

Here is a file I/O issue.

Makoto


On Wed, Jul 2, 2014 at 4:05 PM, Parker, Christopher <christopher.parker.10 at ucl.ac.uk<mailto:christopher.parker.10 at ucl.ac.uk>> wrote:

Hi,


Does anyone know how to save an eeglab structure as a .edf file in MATLAB? pop_export() doesn't seem to be working for me.


I read my .edf file in to MATLAB using:


a = pop_biosig(a_filename, 'importevent','off','importannot','off');


I now want to make some change to the 'data' field (append data from another eeg structure) and then save the .edf file with a different filename.


I tried "pop_export(a,'~/test.edf')" which did save a.edf file in the appropriate place. But it then failed to read back in to MATLAB properly with pop_biosig(). The following error was displayed:


Reading data in unknown format...
Reference to non-existent field 'POS'.

Error in sread (line 53)
        StartPos = HDR.FILE.POS/HDR.SampleRate;

Error in pop_biosig>readfile (line 224)
        DAT=sread(dat, Inf);% this isn't transposed in original!!!!!!!!

Error in pop_biosig (line 142)
[dat DAT interval] = readfile(filename, g.channels, g.blockrange, g.memorymapped);


I also tried it with an empty structure created by typing "eeglab" in to the command line. Again, the file saved but could not be read back in to MATLAB. This gave the error:


Reference to non-existent field 'POS'.

Error in sread (line 53)
        StartPos = HDR.FILE.POS/HDR.SampleRate;

Error in pop_biosig>readfile (line 224)
        DAT=sread(dat, Inf);% this isn't transposed in original!!!!!!!!

Error in pop_biosig (line 142)
[dat DAT interval] = readfile(filename, g.channels, g.blockrange, g.memorymapped);


The saved files also do not open in EDF Browser. Your help with this would be very much appreciated.


Thanks,

Chris

_______________________________________________
Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu<mailto: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<mailto: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/20140709/d982f091/attachment.html>


More information about the eeglablist mailing list