stateVector.variables

Return the names of variables in a state vector


Syntax



Description

variableNames = obj.variables
variableNames = obj.variables(-1)

Returns the ordered list of variables in a state vector. The index of each variable in the list corresponds to the index of the variable in the state vector.

variableNames = obj.variables(v)

Returns the list of variables at the specified variable indices. The order of variables in the list corresponds to the order of input indices.


Input Arguments

v

logical vector [nVariables] | vector, linear indices | -1
The indices of the variables whose names should be returned in the list. If -1, returns the name of every variable in the state vector.

Output Arguments

variableNames

string vector
The list of variable names.