Documentation

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)
    example

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;

Related Examples

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?