2 2
You can also obtain the indices of multiple vector elements at the same time. For example,
get the indices for the first and third elements of the Setpoints vector.
index2 = getInputIndex(opspec,'scdtmpSetpoints/Setpoints',[1 3])
index2 =
2 1
2 3
Input Arguments
op — Operating point specification or operating point
operspec object | operating point object
Operating point specification or operating point for a Simulink model, specified as an
operspec object or operating point object.
block — Block path
character vector | string
Block path that corresponds to an input specification in the Inputs property of op,
specified as a character vector or string that contains the path of a root-level input of a
Simulink model.
To see all the blocks that have input specifications, view the Inputs property of op.
op.Inputs
element — Input element index
positive integer | vector of positive integers
Input element index, specified as a positive integer less than or equal to the port width of
the input specified by block, or as a vector of such integers. By default, if you do not
specify element, getInputIndex returns the indices of all elements in the selected
getInputIndex