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 run ID corresponding to the specified run index


runID = Simulink.sdi.getRunIDByIndex(runIndex)



runID = Simulink.sdi.getRunIDByIndex(runIndex) returns the run ID for the run corresponding to the run index.


collapse all

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

% Create a Simulation Data Inspector run
[runID, runIndex, signalIDs] = Simulink.sdi.createRun('Run1','base',{'simOut'});

% Get the ID of the previously created run by index 
runID2 = Simulink.sdi.getRunIDByIndex(runIndex);
% Both runID and runID2 reference the same run and should be equal
isequal(runID, runID2)
ans =


Input Arguments

collapse all

Number representing an index to the list of runs currently in the Simulation Data Inspector, specified as an integer. The run index is an output of the Simulink.sdi.createRun function.

Output Arguments

collapse all

Run ID, a unique number identifying a run in the Simulation Data Inspector, returned as an integer.

Introduced in R2011b

Was this topic helpful?