Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Include Page
PSDMInternal:PageMenuBeginPSDMInternal:
PageMenuBegin
Table of Contents
Include Page
PSDMInternal:PageMenuEndPSDMInternal:
PageMenuEnd

Introduction

Matlab provides both a high level and a low level interface to the Hdf5 library. Functions at the high level include h5read and h5write for reading and writing from hdf files. Many of our datasets are one dimensional arrays of a compound type. A compound type is a well defined concept in Hdf5, it is like a C struct. In hdfview (a useful tool for viewing hdf5 files provided by the hdf5 group) they often look like two dimensional arrays, but the columns are really the field names of the compound type. When you read a dataset in with h5read each field is separated into its own 1D array. For instance, if the dataset looks like

...

Code Block
  ds
     field1  [3x1 int16]
     field2  [3x1 float32]

...

where {{field1}} was for an enum {{ONE=1, TWO=2, THREE=3}} and was the array {{\[2,1,3\]}}. Then the output of {{translate_enums}} will be

Code Block
ds
  field1  {3x1 cell array}
  field2  [3x1 float32]

...