Documentation Center

  • Trial Software
  • Product Updates

Contents

Simulink.sdi.setRunOverwrite

Mark simulation run for overwrite

Syntax

Simulink.sdi.setRunOverwrite(runID,overwrite)

Description

Simulink.sdi.setRunOverwrite(runID,overwrite) marks a run identified by runID for overwriting in the Simulation Data Inspector with the next recorded simulation run.

Input Arguments

runID

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

Output Arguments

overwrite

Boolean value. When set to true, the next recorded simulation overwrites the run.

Examples

expand all

Mark Run for Overwriting

This example shows how to mark a run for overwriting in the Simulation Data Inspector.

Open sldemo_fuelsys.

On the Simulink Editor toolbar, click the Record button on.

Simulate the model.

Open the Simulation Data Inspector.

In the Signal Browser table, right-click the run name and select Properties.

At the MATLAB command line, create a runID variable that uses the value of the Run ID for a run. You can find Run ID in the Properties dialog box in the Simulation Data Inspector.

runID = 1;

Set the overwrite condition to true.

Simulink.sdi.setRunOverwrite(runID,true);  

In the Simulation Data Inspector, you can see the run is now marked for overwriting.

Simulate sldemo_fuelsys.

In the Simulation Data Inspector, the new recorded data replaces the previous recorded run.

Alternatives

In the Simulation Data Inspector tool, click a run in the Signal Browser table and then click the Overwrite Run button.

Was this topic helpful?