stateVector.dimensionIndices

Return the indices of named dimensions in state vector variables


Syntax



Description

indices = obj.dimensionIndices(v, dimensions)

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.

[indices, dimensions] = obj.dimensionIndices(v, dimensions)

Also return the dimension names as a “string” data type.

= obj.dimensionIndices(v, dimensions, header)

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.

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.