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

Enable overwrite run mode for a Simulation Data Inspector run

Syntax

Simulink.sdi.setRunOverwrite(runID,overwrite)

Description

example

Simulink.sdi.setRunOverwrite(runID,overwrite) enables overwrite run mode for the run identified by runID in the Simulation Data Inspector.

Examples

collapse all

This example shows how to enable overwrite run mode for a run in the Simulation Data Inspector.

Open the sldemo_fuelsys model.

On the Simulink® Editor toolbar, click the Simulation Data Inspector button arrow and select Send Logged Workspace Data to Data Inspector.

Simulate the model.

Open the Simulation Data Inspector.

At the MATLAB® Command Window, create a runID variable that uses the value of the Run ID for a run. You can find the Run ID for a run using the function Simulink.sdi.getRunIDByIndex.

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 to overwrite during the next simulation.

Simulate sldemo_fuelsys.

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

Input Arguments

collapse all

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

The overwrite run setting, specified as a Boolean value. When set to true, the next simulation overwrites the run.

Example: Simulink.sdi.setRunOverwrite(1,true);

Alternatives

In the Simulation Data Inspector, select a run in the Inspect pane and then click Overwrite on the Visualize tab.

Introduced in R2011b

Was this topic helpful?