[Eeglablist] save .edf file

Parker, Christopher christopher.parker.10 at ucl.ac.uk
Wed Jul 2 16:05:54 PDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140702/871fbdbe/attachment.html>


More information about the eeglablist mailing list