Main Content

numpartitions (MDFDatastore)

Number of partitions for MDF datastore



N = numpartitions(mdfds) returns the recommended number of partitions for the MDF datastore mdfds. Use the result as an input to the partition function.

N = numpartitions(mdfds,pool) returns a reasonable number of partitions to parallelize mdfds over the parallel pool, pool, based on the number of files in the datastore and the number of workers in the pool.


collapse all

Determine the number of partitions you should use for your MDF datastore.

mdfds = mdfDatastore(fullfile(matlabroot,'examples','vnt','CANape.MF4'));
N = numpartitions(mdfds); 

Input Arguments

collapse all

MDF datastore, specified as an MDF datastore object.

Example: mdfds = mdfDatastore('CANape.MF4')

Parallel pool specified as a parallel pool object.

Example: gcp

Output Arguments

collapse all

Number of partitions, returned as a double. This number is the calculated recommendation for the number of partitions for your MDF datastore. Use this when partitioning your datastore with the partition function.

See Also


Introduced in R2017b