The first column of idx contains the index of the corresponding state specification in
opspec.States. The second column is 1 for a Simscape state.
View the specification in opspec.States for this state.
opspec.States(idx(1))
(1.) scdTanks_simscape.Tank3.pressure
spec: dx = 0, initial guess: 0
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.
name — Block path or state name
character vector | string
Block path or state name that corresponds to a state specification in the States property
of op, specified as a character vector or string that contains one of the following:
- Block path of a block in the Simulink model that contains unnamed states.
- Name of a named state in a Simulink or Simscape block.
To see all the states that have state specifications, view the States property of op.
op.States
element — State element index
positive integer | vector of positive integers
State element index, specified as a positive integer less than or equal to the number of
state elements in the block or state specified by name, or a vector of such integers. By
default, if you do not specify element, getStateIndex returns the indices of all
elements in the selected state specification. For an example, see “Get Index of Specified
State Element of Operating Point Specification” on page 15-162.
15 Alphabetical List