Documentation

Simulink.sdi.getRunCount

Get the number of runs in the Simulation Data Inspector

Syntax

runCount = Simulink.sdi.getRunCount

Description

example

runCount = Simulink.sdi.getRunCount returns the number of runs that are in the Simulation Data Inspector.

Examples

collapse all

Call Simulink.sdi.getRunCount to get the number of runs currently in the Simulation Data Inspector after a simulation.

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

% Create a Simulation Data Inspector run
runID = Simulink.sdi.createRun('First Run','base',{'simOut'});

% Get run count in the Simulation Data Inspector
runCount = Simulink.sdi.getRunCount()
runCount =

           1

Output Arguments

collapse all

Number of runs that exist in the Simulation Data Inspector, returned as an integer.

Introduced in R2011b

Was this topic helpful?