stateVector.coupledVariables

Lists the sets of coupled variables in a state vector


Syntax



Description

obj.coupledVariables
obj.coupledVariables(0)

Prints the sets of coupled variables to the console.

obj.coupledVariables(-1)
obj.coupledVariables(v)
obj.coupledVariables(variableNames)

Prints the sets of variables that are coupled to each of the listed variables. If the first input is -1, prints the variables coupled to each variable in the state vector.

[namesInSets, indicesInSets] = obj.coupledVariables
[namesInSets, indicesInSets] = obj.coupledVariables(0)

Returns the names of coupled variables in the state vector. The names are organized in a cell vector with one element per set of coupled variables. Each element holds a list of variable names that are coupled to one another. Also returns the indices of the variables in each coupled set.

[names, indices] = obj.coupledVariables(-1)
[names, indices] = obj.coupledVariables(v)
[names, indices] = obj.coupledVariables(variableNames)

Returns the names and indices of variables that are coupled to each of the listed variables. If the first input is -1, returns information for every variable in the state vector.


Input Arguments

v

logical vector | vector [nVariables], linear indices | 0 | -1
The indices of the variables for which to return coupled variables. If 0, provides global information about coupling in the state vector. If -1, returns the coupled variables for each variable in the state vector.

variableNames

string vector [nVariables]
The names of the variables in the state vector for for which to return coupled variables

Output Arguments

namesInSets

cell vector [nSets]{string vector [nCoupledVariables]}
The names of the variables in each set of coupled variables.

indicesInSets

cell vector [nSets] {vector, linear indices [nCoupledVariables]}
The indices of the variables in each set of coupled variables. Inidices are relative to each variable’s position in the state vector.

names

cell vector [nVariables]{string vector [nCoupledVariables]}
The names of the variables coupled to each listed variable.

indices

cell vector [nVariables]{vector, linear indices [nCoupledVariables]}
The indices of the variables coupled to each listed variable.