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

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> HDF5 files > h5read


Read the data of HDF5 dataset


h5read(obj [, name, [, start, count [, stride [, block]]]])
h5read(filename, name [, start, count [, stride [, block]])



a H5Object


a string giving the path to the new dataset


a row of doubles containing the start of the hyperslab


a row of doubles containing the count of the hyperslab


a row of doubles containing the stride of the hyperslab


a row of doubles containing the block of the hyperslab


a string giving the filename


Read the content of a dataset according to the optional hyperslab selection.

It is possible to make an hyperslab selection on the data.

The arguments start, count, stride and block must have a size equal to the number of dimensions of the data:

  • start: gives the coordinates in the data where to start the selection.
  • count: gives the number of selected blocks in each dimension.
  • stride: gives the shift between two consecutives blocks in each dimension. Take care that the stride must be greater than the corresponding block dimension.
  • block: gives the block dimensions.

By default stride and block are set to 1 in each dimension.


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 the data from the dataset 'x'
dx = h5read(a, "/x")

// Now select a part
dx1 = h5read(a, "/x", [3 4], [5 3])

// ...which is equivalent to

// We have finished so we free all the resources

See also

  • h5readattr — Read the data of an HDF5 attribute
  • h5write — Create a dataset (if it does not exist) and write the data
  • h5dataset — Create a dataset and write the data


5.5.0 HDF5 module introduced.
Report an issue
<< h5open HDF5 files h5readattr >>

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:
Mon Jan 03 14:39:57 CET 2022