Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: load part of .mat (fast)
Date: Tue, 22 Jan 2008 18:24:01 +0000 (UTC)
Organization: King's College London
Lines: 14
Message-ID: <fn5cc1$o6d$1@fred.mathworks.com>
References: <fn54b3$13p$1@daniel-new.mch.sbs.de>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1201026241 24781 172.30.248.35 (22 Jan 2008 18:24:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Jan 2008 18:24:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1477
Xref: news.mathworks.com comp.soft-sys.matlab:447028



Or use the "where" function available at
"http://www.mathworks.com/matlabcentral/fileexchange/loadFil
e.do?objectId=12250&objectType=FILE"
to get the data offsets for your variables.

You can then fread from a mat file or memory map the 
variables with memmapfile. 

Where requires files to be saved with the -v6 option (which 
is faster anyway with large files- your speed problems 
probably arise because load is uncompressing the first n-1 
variables to locate the nth: save compresses the variable 
header and the data in one go)