Best way to work with large file (viewing and manipulating the data) - memory mapped temp files?

조회 수: 1 (최근 30일)
Background
I routinely work with large files from different lab equipment setups - sizes can run from 50 MB to 1-2 GB. Analyzing this data requires both viewing it - looking through 5-10 parameters at once for a test period - and manipulating it - mathematical operations, combining parameters, etc. So far I've been doing this by loading the file into the workspace as a data array (up to a file size of 3-400 MB or so), and poking it/plotting it as needed.
My current project is to build a large GUI for scrolling through the parameters in my data files and occasionally doing operations to them while they're on the screen. For example, I might have 2000 parameters in a 1 GB file that my GUI plots 10 at a time. I can then combine two of them into one channel, take the derivative of another, etc etc.
To do this, my thought is to load the file (out of its custom file type) and immediate save it into a 'temporary' working file - probably a standard binary file type or a .mat file. Then I'd access it in a memory-map type fashion (either with the build in memory map or a custom logic type thing). I'll keep records of the operations performed, GUI settings, etc in the active workspace, but only dig into the 'real' data when I have to.
My question - does this sound like the right way to approach this? I'm worried about speed (how fast can I read/write out of the large memory mapped file?) and about running out of memory (workspace memory, not file space).
Any ideas?
Thanks! - J
  댓글 수: 2
Sven
Sven 2011년 11월 28일
Do you have the latest MATLAB version? There was an enhancement to the load() function which allows you to load a certain subset of a file at one time. It might help you avoid too many temporary file issues... just save the whole data to a .mat file, then load pieces of the saved matrix on demand.
Justin
Justin 2011년 11월 28일
Personally I do, but this app would be put out company-wide - some of the folks could potentially be a version or two behind. I'm not against relying on only the newest stuff, but being backwards compatible as much as possible is a big plus.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Adding custom doc에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by