Skip to content

Writing and reading character vectors to/from H5 #692

@ehennestad

Description

@ehennestad

Some observations:

  1. From MATLAB R2020a and onwards, it is possible to write character vectors directly into a VARIABLE LENGTH H5T_STRING. In MATLAB R2019b and earlier, character vectors had to be wrapped in a cell array.
    However, when reading the value of type VARIABLE LENGTH H5T_STRING back from the file, the value will always be a character vector wrapped in a cell array (when using low-level H5 functions). In other words, the value which is read back is not necessarily the same as which is written.
  2. Using h5info to read, at least attribute values will be converted back the char from R2020a and onwards, creating differences in how NWB file objects are represented (see screenshots)
Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions