Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語
Справка Scilab >> HDF5 Management > h5readattr

h5readattr

Read the data of an HDF5 attribute

Syntax

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 — Read the data of HDF5 dataset
  • h5writeattr — Write an attribute in a group or a dataset
  • h5attr — Create an attribute

History

ВерсияОписание
5.5.0 HDF5 module introduced.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:13:25 CET 2017