stateVector.dimensionIndices
Return the indices of named dimensions in state vector variables
Syntax
Description
Return the indices of the named dimensions in the specified state vector variables. Throws an error if a named dimension is not associated with any of the listed variables.
Also return the dimension names as a “string” data type.
Customize thrown error IDs.
Input Arguments
v
vector [nVariables], linear indices
The indices of the state vector variables for which to return dimension indices.
dimensions
string vector [nDimensions]
The names of dimensions that will be indexed in the specified variables.
header
string scalar
Header for thrown error IDs.
Output Arguments
indices
cell vector [nVariables], {vector [nDimensions], linear indices}
The indices of the named dimensions in the specified variables.
dimensions
string vector [nDimensions]
The names of dimensions converted to a “string” data type.