This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Information about HDF5 file

    Note:   hdf5info will be removed in a future version. Use h5info instead.


fileinfo = hdf5info(filename)
fileinfo = hdf5info(...,'ReadAttributes',BOOL)
[...] = hdf5info(..., 'V71Dimensions', BOOL)


fileinfo = hdf5info(filename) returns a structure fileinfo whose fields contain information about the contents of the HDF5 file filename. filename is a character vector that specifies the name of the HDF5 file.

fileinfo = hdf5info(...,'ReadAttributes',BOOL) specifies whether hdf5info returns the values of the attributes or just information describing the attributes. By default, hdf5info reads in attribute values (BOOL = true).

[...] = hdf5info(..., 'V71Dimensions', BOOL) specifies whether to report the dimensions of data sets and attributes as they were returned in previous versions of hdf5info (MATLAB® 7.1 [R14SP3] and earlier). If BOOL is true, hdf5info swaps the first two dimensions of the data set. This behavior was intended to account for the difference in how HDF5 and MATLAB express array dimensions. HDF5 describes data set dimensions in row-major order; MATLAB stores data in column-major order. However, swapping these dimensions may not correctly reflect the intent of the data in the file and may invalidate metadata. When BOOL is false (the default), hdf5info returns data dimensions that correctly reflect the data ordering as it is written in the file—each dimension in the output variable matches the same dimension in the file.

    Note   If you use the 'V71Dimensions' parameter and intend on passing the fileinfo structure returned to the hdf5read function, you should also specify the 'V71Dimensions' parameters with hdf5read. If you do not, hdf5read uses the new behavior when reading the data set and certain metadata returned by hdf5info does not match the actual data returned by hdf5read.


fileinfo = hdf5info('example.h5');

To get more information about the contents of the HDF5 file, look at the GroupHierarchy field in the fileinfo structure returned by hdf5info.

toplevel = fileinfo.GroupHierarchy

toplevel = 

      Filename: [1x64 char]
          Name: '/'
        Groups: [1x2 struct]
      Datasets: []
     Datatypes: []
         Links: []
    Attributes: [1x2 struct]

To probe further into the file hierarchy, keep examining the Groups field.

Was this topic helpful?