FUNCTION REFERENCE
h5write
Write data to an existing HDF5 dataset.
Write data to an existing HDF5 dataset.
Syntax
h5write(filename, ds, data)Syntax
h5write(filename, ds, data, start, count)Syntax
h5write(filename, ds, data, start, count, stride)Without start and count, data must have the dataset's size (as h5read returns it; a one-dimensional dataset takes a row or a column). With them, data fills the hyperslab: count must equal size(data). Values are converted to the dataset type: integer datasets round half away from zero and saturate, as int16() and the other integer conversions do; NaN becomes 0.
Example
h5create('out.h5', '/x', [3 4]); h5write('out.h5', '/x', rand(3, 4))Example
h5write('out.h5', '/x', [1; 2], [2 3], [2 1]) % rows 2-3 of column 3Differences from MATLAB: Text, complex and struct data cannot be written. Datasets do not grow. Not in the browser build.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.