isPartitionable
Class: matlab.io.datastore.SimulationDatastore
Package: matlab.io.datastore
Syntax
Description
Input Arguments
ds
— Input datastore
datastore
Input datastore. You can use these 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
andtransform
functions.Custom datastores — Datastores created using the custom datastore framework. Any datastore that subclasses from
matlab.io.Datastore
supports theisPartitionable
function. See Develop Custom Datastore for more information.
Examples
Test Partitionability of Simulation Datastore
This example shows how to determine the partitionability of a matlab.io.datastore.SimulationDatastore
object that contains big data from a simulation.
Log Big Data from Model
Open the example model sldemo_fuelsys
.
open_system('sldemo_fuelsys')
Select Configuration Parameters > Data Import/Export > Log Dataset data to file.
set_param('sldemo_fuelsys','LoggingToFile','on')
Simulate the model.
sim('sldemo_fuelsys')
The MAT-file out.mat
appears in your current folder. The file contains data for logged signals such as fuel
(which is at the root level of the model).
At the command prompt, create a DatasetRef
object that refers to the logging variable by name, sldemo_fuelsys_output
.
DSRef = Simulink.SimulationData.DatasetRef('out.mat','sldemo_fuelsys_output');
Preview Big Data
Use curly braces ({
and }
) to extract the signal element fuel
, which is the tenth element in DSRef
, as a Simulink.SimulationData.Signal
object that contains a SimulationDatastore
object.
SimDataSig = DSRef{10};
To more easily interact with the SimulationDatastore
object that resides in the Values
property of the Signal
object, store a handle in a variable named DStore
.
DStore = SimDataSig.Values;
Determine if the datastore is partitionable.
if isPartitionable(DStore) disp('Datastore is partitionable.') else disp('Datatstore is not partitionable.') end
Datatstore is not partitionable.
Version History
Introduced in R2020a
Beispiel öffnen
Sie haben eine geänderte Version dieses Beispiels. Möchten Sie dieses Beispiel mit Ihren Änderungen öffnen?
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)