incidenceMatrix
Find incidence matrix of system of equations
Description
Examples
Incidence Matrix
Find the incidence matrix of a system of five equations in five variables.
Create the following symbolic vector eqs containing five
symbolic differential equations.
syms y1(t) y2(t) y3(t) y4(t) y5(t) c1 c3
eqs = [diff(y1(t),t) == y2(t),...
diff(y2(t),t) == c1*y1(t) + c3*y3(t),...
diff(y3(t),t) == y2(t) + y4(t),...
diff(y4(t),t) == y3(t) + y5(t),...
diff(y5(t),t) == y4(t)];Create the vector of variables. Here, c1 and
c3 are symbolic parameters (not variables) of the
system.
vars = [y1(t), y2(t), y3(t), y4(t), y5(t)];
Find the incidence matrix A for the equations
eqs and with respect to the variables
vars.
A = incidenceMatrix(eqs, vars)
A =
1 1 0 0 0
1 1 1 0 0
0 1 1 1 0
0 0 1 1 1
0 0 0 1 1Input Arguments
Output Arguments
Version History
Introduced in R2014b
See Also
daeFunction | decic | findDecoupledBlocks | isLowIndexDAE | massMatrixForm | odeFunction | reduceDAEIndex | reduceDAEToODE | reduceDifferentialOrder | reduceRedundancies | spy