readhdf5toc
Reads a file and displays its table of contents (data structure) in a hierarchy using nested cells.
Syntax
output = readhdf5toc(filename, groupPath, readAll)
Inputs
- filename
- Path to the HDF5 file.
- groupPath
- Fully qualified path of the group in the file.
- readAll
- Reads information under groupPath from all levels if true, otherwise reads only one level.
Outputs
- output
- Type: cell
Example 1
The returned cell with default
inputs:
output=readhdf5toc('plate_linear_static.hdf5')
output =
{
[1,1] Group
[1,2] /INDEX
[2,1] Group
[2,2] /OptiStruct
}
Example 2
The returned cell organized as nested
cells:
output=readhdf5toc('plate_linear_static.hdf5','/',true)
output =
{
[1,1] Group
[1,2] /INDEX
[1,3]
{
[1,1] Group
[1,2] /INDEX/OptiStruct
[1,3]
{
[1,1] Group
[1,2] /INDEX/OptiStruct/RESULT
[1,3]
{
[1,1] Group
[1,2] /INDEX/OptiStruct/RESULT/Subcase 1
[1,3]
{
[1,1] Group
[1,2] /INDEX/OptiStruct/RESULT/Subcase 1/ELEMENT_FORCE
[1,3]
{
[1,1] Dataset
[1,2] /INDEX/OptiStruct/RESULT/Subcase 1/ELEMENT_FORCE/QUAD4
[1,3]
}
...
[2,1] Group
[2,2] /OptiStruct
[2,3]
{
[1,1] Group
[1,2] /OptiStruct/RESULT
[1,3]
{
[1,1] Group
[1,2] /OptiStruct/RESULT/Subcase 1
[1,3]
{
[1,1] Group
[1,2] /OptiStruct/RESULT/Subcase 1/ELEMENT_FORCE
[1,3]
{
[1,1] Dataset
[1,2] /OptiStruct/RESULT/Subcase 1/ELEMENT_FORCE/QUAD4
[1,3]
}
[2,1] Group
[2,2] /OptiStruct/RESULT/Subcase 1/NODAL
[2,3]
{
[1,1] Dataset
[1,2] /OptiStruct/RESULT/Subcase 1/NODAL/DISPLACEMENT
[1,3]
[2,1] Dataset
[2,2] /OptiStruct/RESULT/Subcase 1/NODAL/SPC_FORCE
[2,3]
}
[3,1] Group
[3,2] /OptiStruct/RESULT/Subcase 1/STRAIN
[3,3]
{
[1,1] Dataset
[1,2] /OptiStruct/RESULT/Subcase 1/STRAIN/QUAD4
[1,3]
}
}
}
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