Documentation

Simulink.sdi.getRunCount

Return number of runs in Simulation Data Inspector

Syntax

  • runCount = Simulink.sdi.getRunCount
    example

Description

example

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

Examples

collapse all

Check Run Count After Simulation

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

Related Examples

Output Arguments

collapse all

runCount — Number of runsinteger

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

Introduced in R2011b

Was this topic helpful?