| MATLAB Function Reference | ![]() |
Syntax
data = hdf5read(filename,datasetname) attr = hdf5read(filename,attributename) [data, attr] = hdf5read(...,'ReadAttributes',BOOL) data = hdf5read(hinfo)
Description
data = reads all the data in the data set hdf5read(filename,datasetname)
datasetname that is stored in the HDF5 file filename and returns it in the variable data. To determine the names of data sets in an HDF5 file, use the hdf5info function.
The return value, data, is a multidimensional array. hdf5read maps HDF5 data types to native MATLAB data types, whenever possible. If it cannot represent the data using MATLAB data types, hdf5read uses one of the HDF5 data type objects. For example, if an HDF5 file contains a data set made up of an enumerated data type, hdf5read uses the hdf5.h5enum object to represent the data in the MATLAB workspace. The hdf5.h5enum object has data members that store the enumerations (names), their corresponding values, and the enumerated data. For more information about the HDF5 data type objects, see the hdf5 reference page.
attr = reads all the metadata in the attribute hdf5read(filename,attributename)
attributename, stored in the HDF5 file filename, and returns it in the variable attr. To determine the names of attributes in an HDF5 file, use the hdf5info function.
[data,attr] = reads all the data as well as all of the associated attribute information contained within that data set. By default, hdf5read(...,'ReadAttributes',BOOL)
BOOL is false.
data = reads all of the data in the data set specified in the structure hdf5read(hinfo)
hinfo and returns it in the variable data. The hinfo structure is extracted from the output returned by hdf5info which specifies an HDF5 file and a specific data set.
Examples
Read a data set specified by an hinfo structure. Use hdf5info to get information about the HDF5 file.
Use hdf5read to read the data set specified by the info structure.
See Also
| hdf5info | hdf5write | ![]() |
© 1994-2005 The MathWorks, Inc.