Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - Русский


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.
Report an issue
<< h5read HDF5 files h5rm >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Mar 07 09:28:48 CET 2023