Main Content


Determine whether datastore is partitionable

Since R2020a



tf = isPartitionable(dst) returns logical 1 (true) if the datastore dst is partitionable and logical 0 (false) otherwise.


collapse all

When you have a object that contains big data from a simulation, you can determine the partitionability of the SimulationDatastore using the isPartitionable function.

Log Big Data from Model

Open the example model sldemo_fuelsys.

mdl = "sldemo_fuelsys";

Select Configuration Parameters > Data Import/Export > Log Dataset data to file. Alternatively, you can use the set_param function to log simulation data logged using the Dataset format to a MAT-file instead of the workspace.


Simulate the model.


The MAT-file out.mat appears in your current folder. Logged signal data is stored in the MAT-file with the variable name sldemo_fuelsys_out.

Create a DatasetRef object that refers to the logged signal data.

DSRef = Simulink.SimulationData.DatasetRef("out.mat","sldemo_fuelsys_output");

Preview Big Data

Use curly braces to extract the signal named fuel, which is the tenth element in DSRef, as a Simulink.SimulationData.Signal object. The SimulationDatastore object exists in the in the Values property of the returned Singal object named SimDataSig.

SimDataSig = DSRef{10};
DStore = SimDataSig.Values;

Determine whether the datastore is partitionable.

if isPartitionable(DStore)
    disp("Datastore is partitionable.")
    disp("Datatstore is not partitionable.")
Datatstore is not partitionable.

Input Arguments

collapse all

Input datastore. You can use these types of datastores as input:

  • MATLAB® datastores — Datastores created using MATLAB datastore functions. For a complete list of datastores, see Select Datastore for File Format or Application.

  • Combined and transformed datastores — Datastores created using the combine and transform functions.

  • Custom datastores — Datastores created using the custom datastore framework. Any datastore that subclasses from supports the isPartitionable function. See Develop Custom Datastore for more information.

Version History

Introduced in R2020a