5.0

5.0 | 4 ratings Rate this file 15 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)

No BSD License  

memory mapping and accessing matrices

Download Now | 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
Zip File Content  
Other Files mem/MemMapBin.m,
mem/WriteBinFile.m
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
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com