readhdf5attributes

Reads attributes from a given dataset or group in a given HDF5 file.

Syntax

output = readhdf5attributes(filename, datasetOrGroupPath)

output = readhdf5attributes(filename)

Inputs

filename
Path to the HDF5 file.
Type: string
datasetOrGroupPath
Fully qualified path of the dataset or group in the file.
Optional. If not provided, the file is considered as the location for attribute lookup.
Type: string

Outputs

output
Type: struct
Output struct contains attribute name as key and attribute data as value.
Note: See readhdf5 for output data type mapping.

Example

The returned struct:
output=readhdf5attributes('plate_linear_static.hdf5','/OptiStruct/RESULT/Subcase 1/ELEMENT_FORCE/QUAD4')
       output = struct [
       CLASS: TABLE 
       FIELD_0_NAME: Element ID 
       FIELD_1_NAME: MX 
       FIELD_2_NAME: MY 
       FIELD_3_NAME: MXY 
       FIELD_4_NAME: BMX 
       FIELD_5_NAME: BMY 
       FIELD_6_NAME: BMXY 
       FIELD_7_NAME: TX 
       FIELD_8_NAME: TY 
       TITLE: Table Title 
       VERSION: 3.0 
       ]

Comments

To read HDF4 files, use an HDF4 to HDF5 converter and use the converted file with HDF5 reader commands. Go to the following location to download the converter: https://support.hdfgroup.org/products/hdf5_tools/h4toh5/download.html

Help: https://support.hdfgroup.org/ftp/HDF5/releases/tools/h4toh5/h4toh5-2.2.3/src/unpacked/doc/h4toh5lib_RM.html#Tools-h4toh5