Label a dataset
h5label(obj, location, dims, names) h5label(filename, location, dims, names)
a H5Object
a string giving the location
a row of doubles
a row of strings with the same size as dims
a string giving the filename
Label a dataset according to dims and names. The dims(i)
-nth dimension is labelled with names(i)
.
// We create an HDF5 file a = h5open(TMPDIR + "/test.h5", "w") // The data x = uint8(1:24); // We make a dataset with x as an hypermatrix 1x2x3x4 h5dataset(a, "My Dataset", [1 2 3 4 ; 1 1 1 1 ; 1 1 1 1 ; 1 1 1 1; 1 2 3 4], x, [1 2 3 4 ; 1 2 3 4 ; 1 1 1 1 ; 1 1 1 1 ; 1 1 1 1 ; 1 2 3 4]); // We label it h5label(a, "My Dataset", [1 3], ["Hello" "World"]); // We check h5dump(a) // We close all h5close(a) | ![]() | ![]() |
Version | Description |
5.5.0 | HDF5 module introduced. |