Hauptinhalt

Simulink.sdi.deleteSignal

R2026b

Delete signal in Simulation Data Inspector

Description

Simulink.sdi.deleteSignal(sigID) deletes the specified signal or signals from the Simulation Data Inspector.

example

Examples

collapse all

Delete the third signal in a Simulation Data Inspector run.

Get the ID for the third signal from the run represented by the Simulink.sdi.Run object runObj.

sigID = getSignalIDByIndex(runObj,3);

Delete the signal from the run.

Simulink.sdi.deleteSignal(sigID)

Delete all but the first three signals from a Simulink Data Inspector run represented by the Simulink.sdi.Run object runObj.

Get signal IDs for all signals in the run.

sigIDs = getAllSignalIDs(runObj);

Delete all but the first three signals.

sigsToDelete = sigIDs(4:end);
Simulink.sdi.deleteSignal(sigsToDelete)

Verify that only three signals remain in the run.

runObj.SignalCount
ans = int32
3

Input Arguments

collapse all

ID of signal to delete, specified as a positive integer or a vector of positive integers. The Simulation Data Inspector assigns a unique numeric signal ID to each signal when a run is created for logged or imported data.

You can get the signal ID for a signal using one of these functions:

Version History

Introduced in R2016a