ensembleMetadata.subscriptRows

Return subscripted state dimension indices for rows of a variable


Syntax



Description

indices = obj.subscriptRows(v, variableRows)

Given the rows of a variable in the state vector, returns the subscript indices of the rows for each state dimension of the variable.


Input Arguments

v

scalar linear index
The index of a variable in the state vector

variableRows

vector, linear indices
The indices of rows for the variable. Note that these rows are interpreted relative to the variable, rather than the overall state vector. For example, variableRows=1 returns the subscript indices for the first row of the variable, regardless of its overall position in the state vector.

Output Arguments

indices

cell vector [nStateDims] {linear indices}
Subscript indices of the rows across each of the variable’s state dimensions.