Categories &

Functions List

Function Reference: h5writeatt

Function File: h5writeatt (filename, location, attr, val)

Write a HDF5 attribute.

Input arguments:

filename

Filename of an existing HDF5 file, specified as a string.

location

The full path to an existing node in the HDF5 file, which can be either a Group, a Dataset or a Named DataType. The root group, "/", is also valid.

attr

Name of attribute, specified as a string scalar. If the attribute does not exist, h5writeatt creates the attribute with the name specified. If the specified attribute already exists, it will be overwritten.

val

Value of the attribute to be written. It can be a scalar or array variable, numeric or string (UTF8 by default). The HDF5 standard suggests that attributes should be small in size.

See also: h5readatt

Source Code: h5writeatt