stateVector.remove

Remove variables from a state vector


Syntax



Description

obj = obj.remove(v)
obj = obj.remove(variableNames)

Removes the specified variables from a state vector.

obj = obj.remove(-1)

Removes all variables from a state vector.


Input Arguments

v

logical vector [nVariables] | vector, linear indices | -1
The indices of the variables that should be removed from the state vector. If -1, removes all variables from the state vector.

variableNames

string vector
The names of the variables that should be removed from the state vector.

Output Arguments

obj

scalar stateVector object
The updated stateVector object with variables removed.