[Eeglablist] single and double precision in eeglab / matlab

Clayton Hickey cmhickey at gmail.com
Sun Feb 5 23:55:08 PST 2017


Hi Arno, 

A number of years ago I looked at converting data to single during some of the internal operations for the Makeig implementation of Bell & Sejnowski ICA (ie. runica). This was to try and reduce memory usage for big data files. A few things came up in this process, I submitted a couple of bug reports, and you and I emailed back and forth. 

One thing I found out (thanks to Germán Gómez-Herrero and my own fiddling) was that many of the matlab toolboxes did not support single precision data at the time, and were not graceful in how they failed (ie. they messed up your data without telling you that anything was wrong). In particular, the signal processing toolbox did this.

Not a big deal… you just have to remember to cast data to double before you apply any operations from the SP toolbox, as is done internally for filtering, resampling etc. But it would be easy for someone to be unaware of this, try some new approach with the SP toolbox, and find themselves with a mess… 

It wouldn’t surprise me if Mathworks has updated the commercial toolboxes to consistently and properly support singles. But it also wouldn’t surprise me if they haven’t. A few minutes of google hasn’t given me a clear answer. Do you know? 

thanks, 
clayton





> 
> From: Arnaud Delorme <arno at ucsd.edu>
> Subject: Re: [Eeglablist] ICA running very slowly
> Date: February 4, 2017 at 4:47:32 PM GMT+1
> To: Andreas Widmann <widmann at uni-leipzig.de>
> Cc: eeglablist <eeglablist at sccn.ucsd.edu>
> 
> 
> Yes, this is right which is why the data is automatically converted to double precision when filtering, resampling and ICA.
> 
> Arno

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170206/6925f32d/attachment.html>


More information about the eeglablist mailing list