Hi Davide,<div><br></div><div>I think the data are typically stored in the EEG.data field with single precision.  Unfortunately, I don't have a dataset handy to check that.  To verify, type "isa(EEG.data, 'single')" at the command line.  </div>
<div><br></div><div>I've run into similar problems with very large data sets (e.g., when recording auditory brainstem responses from 10 channels...we record data at >16,000 Hz for several hours, so loading those data all at once is nearly impossible).  My solution was to write a function called "bdf_ChanOps" which will allow you do any arbitrary mathematical operation on your data in the BDF format (which requires only that you read in 1 sec of data at a time).  The output is saved to a new BDF, which can, for instance, have only the channels you are interested in....I use it often to remove channels from a BDF or combine them (average) into a single new channel.  It's been pretty handy.  If you're interested in this, let me know and I'll send it to you.</div>
<div><br></div><div>-Chris<br><br><div class="gmail_quote">On Wed, Aug 29, 2012 at 12:49 AM, Davide Baldo <span dir="ltr"><<a href="mailto:davidebaldo84@gmail.com" target="_blank">davidebaldo84@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<div><br></div><div>Lately I have been working with an EEG dataset containing 64 channels (sampling rate: 2048Hz, Biosemi data).</div>
<div>When importing the data into Matlab (via pop_readbdf function) I experience two problems:</div>
<div><br></div><div>1. It takes a lot of time to load and afterwards the pc became extremely slow (I assume that is because of the huge amount of  RAM needed)</div><div>2. Sometimes the pc run out of memory</div><div><br>

</div><div><br></div><div>Thus I have modified the readbdf function, converting the EEG data from double to single precision (each value occupies 4 bytes instead of 8 bytes):</div><div><br></div><div>   ...</div><div><div>

(line 100)   catch,</div><div>           warning backtrace off;</div><div>           warning('Warning: file might be incomplete');</div><div>           Records(nrec:end) = [];</div><div>           DAT.Record(RecLen*length(Records)+1:end,:) = [];</div>

<div>           S(nrec:end,:) = [];</div><div>           break;</div><div>       end;</div><div><br></div><div> (line 109)  end;</div><div><br></div><div>%%%%%%% START DAVIDE MODIFICATION %%%%%%%%</div><div><br></div><div>

>>>>>>>     DAT.Record = single(DAT.Record); <<<<<<< CONVERTING THE EEG DATA FROM DOUBLE TO SINGLE</div><div><br></div><div>%%%%%%% END DAVIDE 
MODIFICATION  %%%%%%%%
</div><div><br></div><div><br></div><div>if rem(Mode,2)==0<span style="white-space:pre-wrap">   </span>% Autocalib</div><div><span style="white-space:pre-wrap">      </span>DAT.Record=[ones(RecLen*length(Records),1) DAT.Record]*EDF.Calib;</div>

<div>end;                   </div><div><br></div><div>DAT.Record=DAT.Record';</div></div><div><br></div><div>...</div><div><br></div><div><br></div><div>This way the data importing is much faster. The question is: Do you think I can have any problem because of converting EEG data from double to single precision?</div>

<div><br></div><div><br></div><div>Thanks a lot,</div><div><br></div><div><br></div><div>Davide.</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></div>