Nice that you brought that up. memmapfile does make the binary file operations much less painful and more elegant.
just wanted to comment: in my experience reading/writing (actually, both can be implemented with memmampfile) consecutive samples from/to binary file with memmapfile is not much different in terms of memory usage and speed from buffered fread/fwrite (with varying offset, skip, format) given that buffer size is chosen accordingly. It seems after all what matters is file caching by the OS. Also, so far even 64bit version of MATLAB under true 64bit Linux doesn't allow mapping more that 2^31-1, thus limiting you to 2GB file size, if you wanted to map it all.
It works in 7.1SP3 too. Updated both scripts a bit so that different data types are handled correctly. Definitely solves my memory problems. Great idea.
An excellent way to implement the memory mapping capabilities of matlab. Very efficient, very well done.
Maybe the data handling way of the future? ...
Recomende