This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Simulink.sdi.Run class

Package: Simulink.sdi

Manages signal data and metadata of simulation run


The Simulink.sdi.Run object contains the signal information for one simulation run, which includes the 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.


expand all

Date and time of the run, stored as a datetime object.

Description of the run, specified as a character vector. The default value is an empty character vector.

Unique number to identifying a run, stored as an integer.

Name of the run, specified as a character vector. The default value is an empty character vector.

Number of signals in the run, stored as an integer.

Tag for categorization, identification, or attaching other information to this run, specified as a character vector. The default value is an empty character vector.


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


expand all

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',...

% 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.

Introduced in R2012b

Was this topic helpful?