getAsDatastore
Get matlab.io.datastore.SimulationDatastore representation of element
from referenced Dataset object
Syntax
Description
returns a element = getAsDatastore(dsr,idx)matlab.io.datastore.SimulationDatastore
representation of an element from the Simulink.SimulationData.DatasetRef object dsr based on the
index idx.
You can get a SimulationDatastore representation of a
Dataset element if the element was placed into the MAT file by:
Logging
Datasetformat data to persistent storagePlacing the element into a
Simulink.SimulationData.Datasetobject and saving theDatasetobject to a Version 7.3 MAT file
Note
You cannot create a SimulationDatastore representation for
Dataset elements that contain array data.
You can use SimulationDatastore objects to:
Refer to logged simulation data that is stored on disk in a MAT file.
Specify signals to stream incrementally from disk to a simulation.
Provide a basis for big data analysis using MATLAB® functions.
Examples
Input Arguments
Output Arguments
Alternative
You can use curly braces to streamline the indexing syntax to obtain a
SimulationDatastore object for DatasetRef object signal
values instead of using the getAsDatastore function. The requirements and
results are the same when using curly braces as when using the
getAsDatastore function. For example, suppose you configure a model to
log signal data to persistent storage by selecting the Log Dataset data to
file configuration parameter and simulate that model. You can use curly braces
to get a SimulationDatastore object for the first element in the referenced
Dataset object. The SimulationDatastore object exists in
the Values property of the returned
Simulink.SimulationData.Signal object.
sigLogRef = Simulink.SimulationData.DatasetRef('out.mat','logsout'); firstSig = sigLogRef{1}
ans =
Simulink.SimulationData.Signal
Package: Simulink.SimulationData
Properties:
Name: 'x1'
PropagatedName: ''
BlockPath: [1x1 Simulink.SimulationData.BlockPath]
PortType: 'outport'
PortIndex: 1
Values: [1×1 matlab.io.datastore.SimulationDatastore]Version History
Introduced in R2017a


