Path: news.mathworks.com!not-for-mail
From: "Ashish Uthama" <first.last@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: reading HDF5 dataset subset
Date: Tue, 03 Nov 2009 07:22:26 -0500
Organization: TMW
Lines: 28
Message-ID: <op.u2tjboyra5ziv5@uthamaa.dhcp.mathworks.com>
References: <hcnllp$lv2$1@fred.mathworks.com>
NNTP-Posting-Host: uthamaa.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257250946 1437 172.31.57.126 (3 Nov 2009 12:22:26 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Nov 2009 12:22:26 +0000 (UTC)
User-Agent: Opera Mail/10.01 (Win32)
Xref: news.mathworks.com comp.soft-sys.matlab:582021


On Mon, 02 Nov 2009 17:15:21 -0500, Tess  <tess.brandon@noaa.gov> wrote:

> Using the low-level HDF5 functions in Matlab, I have generated some HDF5  
> files with several datasets that are each 512x512x1410.  I need to be  
> able to read subsets of these different layers.  Looks like hdf5read  
> does not have subsetting capabilities like hdfread, so I am guessing I  
> need to use low-level functions such as H5D.read.  How do I translate  
> something like the following high level hdfread call into those HDF5  
> low-level functions?:
>
> data=hdfread('filename','/dataset_name','Index',{[start],[stride],[size]});
> e.g.
> sst=hdfread(file,'/WeeklySST','Index',{[1 1 999],[1 1 1],[512 512 1]});
>
> (Chunk size is set to 512x512x1, but I need to read across those  
> boundaries as well.)
>
> Thanks very much,
> Tess

Tess,

http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/

HDF5 (1.6)
http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/matlab/HDF5_M_Examples-1.6/h5ex_d_hyper.m