Simulink.sdi.Run class

Package: Simulink.sdi

Manages signal data and metadata of simulation run


The Simulink.sdi.Run object contains the signal logging information for one simulation run, which includes the logged signal data, a run ID, and the total number of signals in the run.


The function Simulink.sdi.createRun creates a Simulink.sdi.Run object.



Date and time of the run, stored as a double.


User-specified description of the run. The default value is an empty string.


Read-only unique number to identify a run.


User-specified name of the run. The default value is an empty string.


Number of signals in the run.


User-specified string for categorization, identification, or attaching other information to this run. The default value is an empty string.


getSignalReturn Simulink.sdi.Signal object by signal ID
getSignalByIndexReturn Simulink.sdi.Signal object by index
getSignalIDByIndexReturn signal ID at array index
isValidSignalIDDetermine if signal ID is valid within run

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects in the MATLAB® documentation.


The Simulink.sdi.Run object contains a Simulink.sdi.Signal object for each logged signal. This example creates a run from simulation data in the base workspace. It demonstrates how to access the Simulink.sdi.Run object from the Simulation Data Inspector . You can select which signals to view and then open the Simulation Data Inspector tool to inspect those signals.

% Configure model "slexAircraftExample" for logging and simulate
simOut = sim('slexAircraftExample', 'SaveOutput','on', ...
                  'SaveFormat', 'StructureWithTime', ...
                  'ReturnWorkspaceOutputs', 'on');

% Create a Simulation Data Inspector run, Simulink.sdi.Run,
% from simOut in the base workspace
runID = Simulink.sdi.createRun('My Run', 'base', {'simOut'});

% Get the handle to the run object, Simulink.sdi.Run,
% corresponding to the new run ID
runObj = Simulink.sdi.getRun(runID);

% Get the name of the run
runName =;

% Get number of signals
numSignals = runObj.signalCount;

% To view the all of the signals in the run, select each signal
% in the run by setting the checked property to 'true'
for i=1:numSignals
		signalObj = runObj.getSignalByIndex(i);
		signalObj.checked = true;

% Open the Simulation Data Inspector to inspect the selected signals.

Was this topic helpful?