| MATLAB® | ![]() |
The MATLAB software provides both high-level and low-level access to HDF5 files. The high-level access functions make it easy to read a data set from an HDF5 file or write a variable from the MATLAB workspace into an HDF5 file. The MATLAB low-level interface provides direct access to the more than 200 functions in the HDF5 library. MATLAB currently supports version HDF5-1.6.5 of the library.
Note For information about MATLAB HDF4 capabilities, which is a completely separate, incompatible format, see hdf. |
The following sections provide an overview of both this high- and low-level access. To use these MATLAB functions, you must be familiar with HDF5 programming concepts and, when using the low-level functions, details about the functions in the library. To get this information, go to the HDF Web page at http://www.hdfgroup.org.
MATLAB includes three functions that provide high-level access to HDF5 files:
hdf5info
hdf5read
hdf5write
Using these functions you can read data and metadata from an HDF5 file and write data from the MATLAB workspace to a file in HDF5 format. For more information about these functions, see their individual reference pages.
MATLAB provides direct access to the over 200 functions in the HDF5 Library. Using these functions, you can read and write complex datatypes, utilize HDF5 data subsetting capabilities, and take advantage of other features present in the HDF5 library.
The HDF5 library organizes the routines in the library into interfaces. MATLAB organizes the corresponding MATLAB functions into class directories that match these HDF5 library interfaces. For example, the MATLAB functions for the HDF5 Attribute Interface are in the @H5A class directory.
The following table lists all the HDF5 library interfaces in alphabetical order by name. The table includes the name of the associated MATLAB class directory.
HDF5 Library Interface | MATLAB Class Directory | Description |
|---|---|---|
@H5A | Manipulate metadata associated with data sets or groups | |
@H5D | Manipulate multidimensional arrays of data elements, together with supporting metadata | |
@H5S | Define and work with data spaces, which describe the the dimensionality of a data set | |
@H5T | Define the type of variable that is stored in a data set | |
@H5E | Handle errors | |
@H5F | Access files | |
@H5Z | Create inline data filters and data compression | |
@H5G | Organize objects in a file; analogous to a directory structure | |
@H5I | Manipulate HDF5 object identifiers | |
@H5 | General-purpose functions for use with the entire HDF5 library, such as initialization | |
@H5ML | MATLAB utility functions that are not part of the HDF5 library itself. | |
@H5P | Manipulate object property lists | |
@H5R | Manipulate HDF5 references, which are like UNIX links or Windows shortcuts |
In most cases, the syntax of the MATLAB function is identical to the syntax of the HDF5 library function. To get detailed information about the MATLAB syntax of an HDF5 library function, view the help for the individual MATLAB function, as follows:
help @H5F/open
To view a list of all the MATLAB HDF5 functions in a particular interface, type:
help imagesci/@H5F
hdf, hdf5info, hdf5read, hdf5write
![]() | hdf | hdf5info | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |