ensembleMetadata.find
Locate the rows corresponding to specific variables in a state vector
Syntax
Description
Locate state vector rows/elements associated with the listed variables. If the input is -1, selects all variables in the state vector. The output of the method will depend on the number of variables selected. See syntaxes below for details.
rows = obj.find(variable)
If a single variable is selected, returns the indices of all rows associated with the variable. The output will be a column vector matching the length of the variable in the state vector.
rowLimits = obj.find(variables)
If multiple variables are selected, returns the indices of the first and last row for each variable. The output is a matrix with one row per selected variable and two columns. The two columns list the first and last row of each variable, respectively.
= obj.find(variables, type)
Indicate the type of output to return for the selected variables. See syntaxes below for details.
rows = obj.find(variable, ‘all’|’a’|0)
Return the indices of all the rows associated with a particular variable. You can only specify a single variable when selecting this option.
startRows = obj.find(variables, ‘start’|’s’|1)
Return the index of the first row for each of the listed variables.
endRows = obj.find(variables, ‘end’|’e’|2)
Return the index of the last row for each of the listed variables.
rowLimits = obj.find(variables, ‘limits’|’l’|3)
Return the indices of the first and the last row for each of the selected variables.
Input Arguments
variableNames
v
type
[“all”|”a”|0]: Returns the indices of all of the rows associated with a variable. This is the default when a single variable is selected, and this option can only be used for a single variable.
[“start”|”s”|1]: Returns the starting row of each variable
[“end”|”e”|2]: Returns the final row of each variable
[“limits”|”l”|3]: Returns the first and last row of each variable. This is the default output when multiple variables are selected.