Hi,
I assume you have dataset in some file format that can be read by any of the datastore mentioned here. The partition function will return a partition of that datastore with is indexed by variable idx. For example, the datastore has 36 files and you want to partition it into 6 datastore, so each partition will have 6 files. Each partition can be called with the help of index. Below example can clarify further.
% Let's say ds is the datastore with 36 files
subds1 = partition(ds,6,1); % contains files 1-6
subds2 = partition(ds,6,2); % contains files 7-12
subds3 = partition(ds,6,3); % contains files 13-18
subds4 = partition(ds,6,4); % contains files 19-24
subds5 = partition(ds,6,5); % contains files 25-30
subds6 = partition(ds,6,6); % contains files 31-36
Hope it helps!