%% Write to Block of Dataset
% Create a 10-by-20 dataset named DS2.

h5create('myfile.h5','/DS2',[10 20])

% Write a 5-by-7 subset of data to the last 5-by-7 block of the dataset. Specify count as [5 7] to match the size of the data you are writing. Specify start as [6 14], because moving count cells from this starting point will end in the last element of the dataset.

mydata = rand(5,7);
h5write('myfile.h5','/DS2',mydata,[6 14],[5 7])

% Copyright 2015 The MathWorks, Inc.