Documentation

Simulink.sdi.createRunOrAddToStreamedRun

Create a single run for all simulation outputs

Syntax

runID = Simulink.sdi.createRunOrAddToStreamedRun(mdl, runName, varNames, varValues)

Description

runID = Simulink.sdi.createRunOrAddToStreamedRun(mdl, runName, varNames, varValues) creates a new run with the data identified by varNames and varValues if no run exists for the model identified by mdl. The function adds the data identified by varNames and varValues to an existing run if a run associated with mdl already exists.

Examples

collapse all

%load system
load_system('slexAircraftExample')

%mark signal for logging
Simulink.sdi.markSignalForStreaming('slexAircraftExample/Aircraft Dynamics Model', ...
		 4, 'on')

%simulate model
sim('slexAircraftExample')

%create cells for names and data
names = cell({'tout', 'xout', 'yout'});
data = cell({tout, xout, yout});

%add data to run
Simulink.sdi.createRunOrAddToStreamedRun('slexAircraftExample', ...
		'Run 1', names, data);

Input Arguments

collapse all

Name of the model the simulation data is from, specified as a character vector.

Example: 'sldemo_absbrake'

Name for the new or augmented run.

Cell array containing the names of all signals and variables.

Cell array containing all of the data for signals and variables.

Output Arguments

collapse all

Numerical identifier for created or augmented run.

Introduced in R2017a

Was this topic helpful?