solve (Matrix)
Solves a system of linear equations xM=b. If it is solvable,
M b solve
returns x D _ TRUE
such that (1/D)*x is the solution. If the system is not solvable, M b solve
returns _ _ c FALSE
such that c*M^T = <0> and b c dot =/= 0
Arguments
Coefficient
matrix
(see Matrix).vector
of free terms (see Vector).
Return values
solutionVector
is a Vector of values that after dividing by solutionDivisor
satisfy the system of equations, empty if the system is not solvable.solutionDivisor
is a real number to divide the solutionVector
by to get the solution, empty value if not solvable.eigenvector
of the coefficient matrix if the system is solvable, empty otherwise (see Vector).solvableCondition
is TRUE if the system is solvable, FALSE otherwise.
Complexity
O(size^3)
Example
Output:
fail, v: -0.111111,1.000000,-0.777778,
factor: 1.000000
1.000000,2.000000,0.000000,
factor: 1.000000
0.200000,0.400000,0.000000,