Documentation Center

  • Trial Software
  • Product Updates

Contents

Simulink.sdi.copyRun

Create copy of run including simulation output data

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.

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

Input Arguments

runID

Run ID, a unique number identifying a run in the Simulation Data Inspector.

Output Arguments

runIDcopy

Run ID, a unique number identifying the copied run.

runIndex

Number representing the new run's index to the list of runs currently in the Simulation Data Inspector.

signalIDs

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.

Examples

Copy a Simulink.sdi.Run object representing a run currently in the Simulation Data Inspector.

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

See Also

|

Was this topic helpful?