Package: Simulink.SimulationData
Superclasses:
Create Simulink.SimulationData.DatasetRef
object
To use a reference for accessing a Simulink.SimulationData.Dataset
object
stored in a MAT-file, create a Simulink.SimulationData.DatasetRef
object.
You can use this reference to avoid running out of memory, by retrieving data signal by
signal, for data that you log to persistent
storage. You can stream a DatasetRef
object into a root-level
input port or you can use it to create a SimulationDatastore
object to use
for streaming. For details, see Load Big Data for Simulations.
For parallel simulations, for which you specify an array of
Simulink.SimulationInput
objects, if you are logging to file, Simulink®:
Creates Simulink.SimulationData.DatasetRef
objects
to access output data in the MAT-file and includes those objects in
the SimulationOutput
object data
Enables the CaptureErrors
argument
for simulation
creates a reference to the contents of a DSRefObj
= Simulink.SimulationData.DatasetRef(location
,identifier
)Simulink.SimulationData.Dataset
variable stored in a MAT-file.
Use the numElements
, getElement
,
and getElementNames
methods for a Simulink.SimulationData.DatasetRef
object
the same way that you use those methods for a Simulink.SimulationData.Dataset
object.
Method | Purpose |
---|---|
Get number of elements from dataset | |
Return names of all elements in dataset | |
The Note You can use curly braces to streamline indexing syntax to access
elements in a dataset reference, instead of using | Get element from dataset |
Get | |
List names of | |
Plot data in the Simulation Data Inspector |
Tip
To get the names of Dataset
variables in
the MAT-file, using the
function
processes faster than using the Simulink.SimulationData.DatasetRef.getDatasetVariableNames
who
or whos
functions.
You can copy DatasetRef
object properties by value. However, copying the
DatasetRef
object produces a handle object. Copying the
DatasetRef
object does not copy the data in the MAT-file that the object
references. For details about copy operations, see Copying Objects in the MATLAB documentation.
matlab.io.datastore.SimulationDatastore
| Simulink.SimulationData.Dataset
| Simulink.SimulationData.DatasetRef.getDatasetVariableNames