opspec.States(1.) position
spec: dx = 0, initial guess: 0
(2.) velocity
spec: dx = 0, initial guess: 0
(3.) acceleration
spec: dx = 0, initial guess: 0To obtain the index of a state specification that corresponds to a named state within a
block, specify the state name.index1 = getStateIndex(opspec,'velocity')index1 =2 1The first column of index1 contains the index of the corresponding state specification in
the opspec.States property. The second column is 1 for a named state.Get Index of Simscape State from Operating Point SpecificationOpen model.mdl = 'scdTanks_simscape';
mdlpath = fullfile(matlabroot,'examples','slcontrol',mdl);
open_system(mdlpath)15 Alphabetical List
