computeIncidenceMatrix

Method of CPNTensor.

Structural incidence matrix of the equation system: which signal appears in which equation.

Source: src/tensor/@CPNTensor/computeIncidenceMatrix.m

Syntax

I = obj.computeIncidenceMatrix()

Description

computeIncidenceMatrix returns the logical incidence matrix of the multilinear equation system stored in the tensor. Rows are equations and columns are signals; I(j,l) is true when signal ll appears in at least one monomial of equation jj, and false otherwise. Only the sparsity pattern matters — the numeric coefficients are discarded. Because it depends only on which signals are present, the incidence is base-independent: monomial vs literal base changes factor values, not which signals appear.

It is computed from the sparsity patterns of the structure and parameter components. A logical signal-by-monomial pattern is formed from the three structure components,

S=spones(Continuous+TrueFalse), S = \operatorname{spones}\!\bigl(\text{Continuous} + \text{True} - \text{False}\bigr),

and a logical equation-by-monomial pattern Φ\Phi from the three parameter components. The incidence follows from which equations share a monomial with which signals:

I=spones(ΦS). I = \operatorname{spones}\!\bigl(\Phi\, S^\top\bigr).

The result has one row per equation and one column per signal in the tensor’s native row order. To map rows and columns back to specific equations and signals, index with the owning mdss model’s index vectors (equalityIndex, inequalityIndex, stateDeltaIndex, stateIndex, inputIndex, algebraicIndex, binaryIndex).

Input arguments

Argument Description
obj CPNTensor holding the equation system.

Output arguments

Output Description
I Sparse logical incidence matrix, equations (rows) by signals (columns).

See also

CPNTensor · computeJacobian · mdss


Author: Nicholas Tedjosantoso.


MyToolbox Documentation | Generated automatically by CI/CD pipeline