add
Import data into existing run in Simulation Data Inspector using
Simulink.sdi.Run
object
Syntax
Description
Import Data from Workspace
add(
imports the data in the variable runObj
,var
)var
into the Simulation Data
Inspector by adding a signal to the run that corresponds to the specified
Simulink.sdi.Run
object.
To import data into a new run, use the Simulink.sdi.Run.create
function or the Simulink.sdi.createRun
function.
add(
imports data from one or more variables into the Simulation Data Inspector by
adding one or more signals to the run that corresponds to the specified
runObj
,'namevalue',sourceNames
,sigValues
)Run
object. The sourceNames
argument
specifies values to use for the data source in the metadata for the signals
added to the run.
Import Data from File
add(
imports data from a file into the Simulation Data Inspector by adding one or
more signals to the run that corresponds to the specified runObj
,'file',filename
)Run
object. You can use a built-in file reader to import data from a MAT file, CSV
file, Microsoft®
Excel® file, or 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.
add(
imports data from a file into the Simulation Data Inspector by adding one or
more signals to the run that corresponds to the specified runObj
,'file',filename
,Name=Value
)Run
object. For example, sheets=["sheet1" "sheet2"]
specifies the
sheets from which to import data when importing data from an Excel file.
Examples
Input Arguments
Version History
Introduced in R2017b