ensembleMetadata.variableIndices

Parse and return indices of variables in a state vector ensemble


Syntax



Description

v = obj.variableIndices(variables)

Parses the indices of input variables. Returns linear indices to input variables.

v = obj.variableIndices(variables, allowRepeats)

Indicate whether to throw an error when repeated variables occur.

v = obj.variableIndices(variables, allowRepeats, header)

Customize header in thrown error IDs


Input Arguments

variables

any data type
The input being parsed. If valid, a set of variable names or indices of variables in the state vector.

allowRepeats

scalar logical
Whether to allow repeated variables (true - default) or to throw an error when repeats occur (false)

Output Arguments

v

vector, linear indices
The indices of the variables in the state vector.