Simulink.sdi.Run.create
Import data into new run in Simulation Data Inspector and return
Simulink.sdi.Run object
Syntax
Description
Create Empty Run
creates the empty runObj = Simulink.sdi.Run.createSimulink.sdi.Run object,
runObj. You can add signals to the Run
object using the add function or the Simulink.sdi.addToRun
function.
Import Data from Workspace
imports data from one or more variables into a new run in the Simulation Data
Inspector named runObj = Simulink.sdi.Run.create(runName,'vars',var,var2,...,varn)runName.
Use this syntax to import data from multiple variables or from a variable that
represents an array of objects, such as an array of Simulink.SimulationOutput or
Simulink.SimulationData.Dataset
objects.
imports data from one or more variables into a new run in the Simulation Data
Inspector named runObj = Simulink.sdi.Run.create(runName,'namevalue',sourceNames,sigValues)runName. The cell array
sourceNames specifies the names used to set the
RootSource, TimeSource, and
DataSource properties for the signals imported from the
sigValues cell array.
Import Data from File
imports data from a file into a new run in the Simulation Data Inspector named
runObj = Simulink.sdi.Run.create(runName,'file',filename)runName. You can use a built-in file reader to import
data from a MAT file, CSV file, Microsoft®
Excel® file, or an MDF file.
When you need to import data from a file that the built-in readers do not
support, you can write your own reader using the io.reader class.
imports data from a file into a new run in the Simulation Data Inspector
according to options specified using one or more name-value arguments. For
example, runObj = Simulink.sdi.Run.create(runName,'file',filename,Name=Value)sheets=["sheet1" "sheet2"] specifies the sheets from
which to import data when importing data from an Excel file.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Version History
Introduced in R2017b
See Also
Objects
Functions
Simulink.sdi.createRun|Simulink.sdi.createRunOrAddToStreamedRun|add|io.reader.getRegisteredFileReaders|io.reader.getSupportedReadersForFile
