ensemble.variableIndices

Parse the indices of variables in an ensemble


Syntax



Description

v = obj.variableIndices(variables, scope)

Parse the indices of variables in an ensemble. Error checks logical or linear indices and locates variable names. Returns linear indices to the specified variables. Throws error if variables are an unrecognized type.

Interprets inputs within a particular scope. If the scope is used variables, then error checks and parses relative to the variables being used by the ensemble object. If the scope is file variables, error checks and parses relative to the variables saved in the .ens file.

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

Customize header in thrown error IDs


Input Arguments

variables

any data type
The input being parsed. If valid, either a set of indices or variable names.

scope

string scalar | scalar logical
The scope in which to interpret the variables

[“used”|”u”|false]: The variables used by the ensemble object

[“file”|”f”|true]: The variables saved in the .ens file


Output Arguments

v

vector, linear indices
The indices of the variables in the

.ens file. Note that the output is always in the context of file variables, regardless of the scope of the inputs.