<< Appx., BHV2 Format >> Appx., NIMH DAQ Toolbox ^ Top

# HDF5 Implementation

Creating and reading .h5 files are implemented with MATLAB’s low-level HDF5 access functions. In BHV2, the name, type and size of each variable are stored in the 6 fields that come at the beginning of each variable block. In H5, those fields are stored as attributes of datasets or groups.

The HDF5 implementation in MATLAB R2014b or earlier does not allow one to create a 0-sized dataspace. So H5 files created in those versions contains a single 0, even when the variable is empty. If the size attribute of a variable is 0, you should discard its value, 0, when you read the variable in your application.

The MATLAB primitive data types are stored in datasets. The struct and cell arrays are created as groups of the fields or cells.

H5 can be read with any common HDF5 tool, like HDFView.

Refer to mlhdf5.m for implementation details.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.

- Freedom of Information Act
- HHS Vulnerability Disclosure

- National Institute of Mental Health
- National Institutes of Health
- U.S. Department of Health and Human Services
- USA.gov