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.


Get the number of runs in the Simulation Data Inspector


runCount = Simulink.sdi.getRunCount



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


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

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


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?