Dataset (H5D)
Multidimensional arrays of data elements and supporting metadata
Description
Use the MATLAB® HDF5 dataset interface, H5D
, to create, read, and write
datasets, and access information about them.
An HDF5 dataset is an object composed of a collection of data elements, or raw data, and metadata that stores a description of the data elements, data layout, and all other information necessary to write, read, and interpret the stored data.
Functions
H5D.close
Close dataset
H5D.close(dsID)
ends access to a dataset specified by
dsID
and releases resources used by it.
H5D.create
Create new dataset
dsID = H5D.create(locID,dsname,typeID,spaceID,dcplID)
creates the
dataset with the name dsname
in the file or in the group specified by
locID
. This syntax corresponds to the H5Dcreate1
interface in version 1.6 of the HDF5 C library.
dsID = H5D.create(locID,dsname,typeID,spaceID,lcplID,dcplID,daplID)
creates the dataset with three property list identifiers, lcplID
,
dcplID
, and daplID
. This syntax corresponds to
the H5Dcreate2
interface in version 1.8 of the HDF5 C library.
H5D.flush
Flush all data buffers to disk
H5D.flush(dsID)
causes all buffers for the dataset associated with
identifier dsID
to be immediately flushed to disk without removing data
from the cache.
H5D.get_access_plist
Copy of dataset access property list
plistID = H5D.get_access_plist(dsID)
returns the identifier to a copy
of the dataset access property list used to open the dataset specified by
dsID
.
H5D.get_create_plist
Copy of dataset creation property list
plistID = H5D.get_create_plist(dsID)
returns the identifier to a copy
of the dataset creation property list for the dataset specified by
dsID
.
H5D.get_offset
Location of dataset in file
offset = H5D.get_offset(dsID)
returns the location in the file of the
dataset specified by dsID
. The location is expressed as an offset, in
bytes, from the beginning of the file.
H5D.get_space
Copy of dataset dataspace
dspaceID = H5D.get_space(dsID)
returns an identifier for a copy of the
dataspace for the dataset specified by dsID
.
H5D.get_space_status
Determine if space is allocated
status = H5D.get_space_status(dsID)
determines whether space has been
allocated for the dataset specified by dsID
.
H5D.get_storage_size
Determine required storage size
dsetsize = H5D.get_storage_size(dsID)
returns the amount of storage,
in bytes, that is required for the dataset specified by dsID
.
H5D.get_type
Copy of datatype
typeID = H5D.get_type(dsID)
returns an identifier for a copy of the
datatype for the dataset specified by dsID
.
H5D.open
Open specified dataset
dsID = H5D.open(locID,dsname)
opens the dataset specified by
dsname
in the file or group specified by
locID
.
dsID = H5D.open(locID,dsname,daplID)
opens the dataset specified by
dsname
in the file or group specified by locID
with the dataset access property list specified by daplID
.
H5D.read
Read data from HDF5 dataset
data = H5D.read(dsID)
reads the entire dataset specified by
dsID
.
data = H5D.read(dsID,memtypeID,memspaceID,filespaceID,dxplID)
reads
the dataset specified by dsID
with additional parameters.
H5D.refresh
Clear and reload all data buffers
H5D.refresh(dsID)
clears all buffers associated with dataset
dsID
and immediately reloads them with updated content from
disk.
H5D.set_extent
Change size of dataset dimensions
H5D.set_extent(dsID,extents)
changes the dimensions of the dataset
specified by dsID
to the sizes specified in
extents
.
H5D.vlen_get_buf_size
Determine variable length storage requirements
size = H5D.vlen_get_buf_size(dsID,typeID,spaceID)
determines the
number of bytes required to store the variable-length data from the dataset specified by
dsID
.
H5D.write
Write data to HDF5 dataset
H5D.write(dsID,memtypeID,memspaceID,filespaceID,dxplID,buf)
writes
the dataset specified by dsID
from the application memory buffer
buf
into the file.
Examples
Version History
Introduced before R2006aSee Also
Attribute (H5A)
| File (H5F)
| Group (H5G)
| Property (H5P)
| Reference (H5R)
| Dataspace (H5S)
| Datatype (H5T)