<p>I would suggest downsampling first - 512 Hz (2 ms resolution in an ERP) should be fine, if that's sufficient for your needs.</p><p>That'll speed things up remarkably :)  You can use "Decimator" from Biosemi to do this before you import, if you want.</p><p>Also, I tend to use "Converter" to move BDF files into EDF+ format before importing into Matlab.  This essentially applies a 0.016 Hz highpass filter, discarding the DC offset and making much smaller files.</p><p>Lastly, your CPU and operating system both need to be 64-bit versions (as does your Matlab) if you want to ever be able to use more than 2GB of RAM - I'm assuming you are running out of RAM even with a lot of it and 64-bit, but just in case that's another gotcha.</p><p> </p><p>Best,</p><p>andrew</p><p> </p><p><br>On Today 12:49 AM, davidebaldo84@gmail.com wrote: <br><br>Dear all,</p><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 class="Apple-tab-span" style="white-space:pre">        </span>% Autocalib</div><div><span class="Apple-tab-span" style="white-space:pre">  </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>