<div dir="ltr">Dear Ramon,<div><br></div><div>Here is a file I/O issue.</div><div><br></div><div>Makoto</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 2, 2014 at 4:05 PM, Parker, Christopher <span dir="ltr"><<a href="mailto:christopher.parker.10@ucl.ac.uk" target="_blank">christopher.parker.10@ucl.ac.uk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,</p>
<p><br>
</p>
<p>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.<br>
</p>
<p><br>
</p>
<p>I read my .edf file in to MATLAB using:</p>
<p><br>
</p>
<p>a = pop_biosig(a_filename, 'importevent','off','importannot','off');</p>
<p><br>
</p>
<p>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.
<br>
</p>
<p><br>
</p>
<p>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:</p>


<p><br>
</p>
<p>Reading data in unknown format...<br>
Reference to non-existent field 'POS'.<br>
<br>
Error in sread (line 53)<br>
        StartPos = HDR.FILE.POS/HDR.SampleRate;<br>
<br>
Error in pop_biosig>readfile (line 224)<br>
        DAT=sread(dat, Inf);% this isn't transposed in original!!!!!!!!<br>
<br>
Error in pop_biosig (line 142)<br>
[dat DAT interval] = readfile(filename, g.channels, g.blockrange, g.memorymapped);</p>
<p><br>
</p>
<p>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:</p>
<p><br>
</p>
<p>Reference to non-existent field 'POS'.<br>
<br>
Error in sread (line 53)<br>
        StartPos = HDR.FILE.POS/HDR.SampleRate;<br>
<br>
Error in pop_biosig>readfile (line 224)<br>
        DAT=sread(dat, Inf);% this isn't transposed in original!!!!!!!!<br>
<br>
Error in pop_biosig (line 142)<br>
[dat DAT interval] = readfile(filename, g.channels, g.blockrange, g.memorymapped);</p>
<p><br>
</p>
<p>The saved files also do not open in EDF Browser. Your help with this would be very much appreciated.</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Chris<br>
</p>
</div>
</div>

<br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br></blockquote></div><br><br clear="all"><div><br></div>

-- <br><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div>
</div>