Contenido principal

getSignalByIndex

R2026b

Get signal in Simulink.sdi.Run object by index

Description

sig = getSignalByIndex(runObj,idx) returns the Simulink.sdi.Signal object, sig, at the index specified by idx within the Simulink.sdi.Run object runObj.

example

Examples

collapse all

Get the most recently created run.

runObj = Simulink.sdi.Run.getLatest;

Get the first signal in the run.

sig1 = getSignalByIndex(runObj,1);

Input Arguments

collapse all

Run that contains the signal you want to access, specified as a Simulink.sdi.Run object.

Index of the signal within the run, specified as an integer.

Output Arguments

collapse all

Signal at the specified index in the Run object, returned as a Simulink.sdi.Signal object.

Version History

Introduced in R2012b