findSignal
Find index of signals in Signals
property vector
Description
sigIdx = findSignal(
creates a vector of numeric indices corresponding to the mdlInfo
,blkPath
)Signals
vector
of the model logging override settings object mdlInfo
for the signals
specified by the block path blkPath
.
To find a single instance of a signal within a referenced model, use a
Simulink.BlockPath
object or a cell array with a full path.To find all instances of a signal within a referenced model, use a character vector with the relative path of the signal within the referenced model.
To find a logged chart signal within a Stateflow® chart, use a
Simulink.BlockPath
object and set theSubPath
property to the name of the Stateflow chart signal.
sigIdx = findSignal(
finds the indices of the output signal for the specified port.mdlInfo
,blkPath
, portIdx
)
Do not use the portIdx
argument for Stateflow chart signals. For an example that uses the findSignal
function with a Stateflow chart, see Override Logging Properties with the Command-Line API (Stateflow).
Examples
Input Arguments
Version History
Introduced in R2012b
See Also
Objects
Simulink.SimulationData.ModelLoggingInfo
|Simulink.SimulationData.SignalLoggingInfo
|Simulink.BlockPath