No BSD License  

Highlights from
Memory mapping matrices

5.0

5.0 | 4 ratings Rate this file 5 Downloads (last 30 days) File Size: 1.54 KB File ID: #12694

Memory mapping matrices

by David B. Omer

 

18 Oct 2006 (Updated 27 Nov 2006)

memory mapping and accessing matrices

| Watch this File

File Information
Description

making and accessing files via memory mapping. very useful when working with a very large data sets/matrices. instead of loading the whole matrix , you can access just specific part of it. very efficient.

MATLAB release MATLAB 7.3 (R2006b)
Other requirements nonee
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
23 Oct 2006 ron ganor

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

01 Feb 2007 Claudiu Giurumescu

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.

21 Mar 2007 Anton Sirota

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.

28 Mar 2009 Tarik Akbudak

could you explain how to assign complex data types too?? because it is not allowed to assign complex numbers in matrices.

Please login to add a comment or rating.
Updates
27 Nov 2006

ta ta ..

Tag Activity for this File
Tag Applied By Date/Time
structures David B. Omer 22 Oct 2008 08:44:24
cell arrays David B. Omer 22 Oct 2008 08:44:24
memory mapping files pointers data David B. Omer 22 Oct 2008 08:44:24

Contact us at files@mathworks.com