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 (https://support.hdfgroup.org/products/java/hdfview/).
Refer to mlhdf5.m for implementation details.