Class: Simulink.SimulationData.DatasetRef
Package: Simulink.SimulationData
Get matlab.io.datastore.SimulationDatastore representation of element from referenced Dataset object
element = Simulink.SimulationData.DatasetRef.getAsDatastore(datasetref_elements)
element = Simulink.SimulationData.DatasetRef.getAsDatastore(datasetref_elements)
returns a matlab.io.datastore.SimulationDatastore
representation of an
element or collection of elements from the referenced dataset, based on index, name, or block
path of the element.
You can represent a Dataset
element as a matlab.io.datastore.SimulationDatastore
object
if the element was placed into the MAT-file using either of these
approaches:
Log Dataset
format data to persistent
storage (MAT-file).
Place the element into a Simulink.SimulationData.Dataset
object
and saved the Dataset
object to a v7.3 MAT-file.
The SimulationDatastore
representation for
a Dataset
element creates a SimulationDatastore
object for the Values field of that element. The SimulationDatastore
representation
supports streaming of the data for the Values
property
of the element into other simulations or into MATLAB®.
Note
You cannot use create a SimulationDatastore
for Dataset
elements
that contain these types of data:
Array
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.
To streamline the use of indexing, you can use curly braces ({}
) syntax to
obtain a SimulationDatastore
object for DatasetRef
object signal values. The requirements and results are the same as using
getAsDatastore
. For example, if you log signal data to persistent storage
(select the Log Dataset data to file configuration parameter) and
simulate a model.
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]
matlab.io.datastore.SimulationDatastore
| Simulink.SimulationData.Dataset
| Simulink.SimulationData.DatasetRef