Main Content

getDatasetRef

Create a Simulink.sdi.DatasetRef object for a run

Description

sdiDSRef = getDatasetRef(runObj) creates a Simulink.sdi.DatasetRef object, sdiDSRef, that references the data in the Simulink.sdi.Run object runObj. Use a DatasetRef object to process your data when the data is too large to fit into memory.

example

Examples

collapse all

The model sldemo_fuelsys uses signal logging to log data for a fault-tolerant fuel control system. Signal logging data is automatically streamed to the Simulation Data Inspector.

To create a run in the Simulation Data Inspector, simulate the model.

mdl = "sldemo_fuelsys";
sim(mdl);

Use the Simulink.sdi.Run.getLatest function to get the latest run.

fuelRun = Simulink.sdi.Run.getLatest;

Use the getDatasetRef function to create a Simulink.sdi.DatasetRef object for the run.

DSRef = getDatasetRef(fuelRun)
DSRef = 
  DatasetRef with properties:

           Name: 'Run <run_index>: <model_name>'
            Run: [1x1 Simulink.sdi.Run]
    numElements: 16

Input Arguments

collapse all

Simulation Data Inspector run with data you want to process that does not fit into memory, specified as a Simulink.sdi.Run object.

Output Arguments

collapse all

Reference to run data that you can use to process data that does not fit into memory, returned as a Simulink.sdi.DatasetRef object.

Version History

Introduced in R2017b