Documentation

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

Create a copy of a run

Syntax

runIDcopy = Simulink.sdi.copyRun(runID)
[runIDcopy,runIndex] = Simulink.sdi.copyRun(runID)
[runIDcopy,runIndex,signalIDs] = Simulink.sdi.copyRun(runID)

Description

runIDcopy = Simulink.sdi.copyRun(runID) copies the run associated with runID and returns a run ID, runIDcopy, associated with the new run. The new run contains all of the simulation output data and metadata from the original run.

[runIDcopy,runIndex] = Simulink.sdi.copyRun(runID) copies the run associated with runID and returns the run ID, runIDcopy, and the runIndex for the new run.

example

[runIDcopy,runIndex,signalIDs] = Simulink.sdi.copyRun(runID) copies the run associated with runID and returns the run ID, run index, and array of new signal IDs, signalIDs, for signals in the new run.

Examples

collapse all

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

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

[newRunID,runIndex,signalIDs] = Simulink.sdi.copyRun(runID);

% See the results in Simulation Data Inspector
Simulink.sdi.view;

Input Arguments

collapse all

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

Output Arguments

collapse all

The unique number identifying the copied run, returned as an integer.

Number representing the new index to the list of runs currently in the Simulation Data Inspector, returned as an integer.

Vector of numbers, where each element is a unique ID for a signal in this run. The signal IDs are different in the new run.

Introduced in R2011b

Was this topic helpful?