# h5readattr

Read the data of an HDF5 attribute

## Calling Sequence

                h5readattr(obj [, location], name)
                h5readattr(filename, location, name)

## Arguments

obj

  a H5Object

name

  a string giving the path to the attribute name

location

  a string giving the path to the group or the dataset containing the attribute

filename

  a string giving the filename

## Description

Read the content of an attribute.

## Examples

    x = int8(matrix(1:80, 10, 8));
    save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones

    // Open the created file
    a = h5open(TMPDIR + "/x.sod");

    // Read an attribute of the root group
    scilab_version = h5readattr(a, "/", "SCILAB_scilab_version")

    // and another one
    sod_version = h5readattr(a.root, "SCILAB_sod_version")

    // and one from a dataset
    scilab_class = h5readattr(a.root.x, "SCILAB_Class")

    // We have finished so we free all the resources
    h5close(a);

## See Also

- h5read
- h5writeattr
- h5attr

## History

5.5.0
HDF5 module introduced.