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)
返回一个matlab.io.datastore.SimulationDatastore
表示一个元素或elem的集合ents from the referenced dataset, based on index, name, or block path of the element.
You can represent aDataset
element as amatlab.io.datastore.SimulationDatastore
object if the element was placed into the MAT-file using either of these approaches:
LogDataset
format data to persistent storage (MAT-file).
Place the element into aSimulink.SimulationData.Dataset
object and saved theDataset
object to a v7.3 MAT-file.
TheSimulationDatastore
representation for aDataset
element creates a SimulationDatastore object for the Values field of that element. TheSimulationDatastore
representation supports streaming of the data for theValues
property of the element into other simulations or into MATLAB®.
Note
You cannot use create aSimulationDatastore
forDataset
elements that contain these types of data:
Array
You can useSimulationDatastore
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 aSimulationDatastore
object forDatasetRef
object signal values. The requirements and results are the same as usinggetAsDatastore
. For example, if you log signal data to persistent storage (select theLog Dataset data to fileconfiguration parameter) and simulate a model.
sigLogRef = Simulink.SimulationData.DatasetRef('out.mat','logsout'); firstSig = sigLogRef{1}
ans = 金宝appSimulink.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]
Simulink.SimulationData.DatasetRef
|matlab.io.datastore.SimulationDatastore
|Simulink.SimulationData.Dataset