mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.3 KiB
1.3 KiB
| layout |
|---|
| default |
Function usolveAll #
Finds all solutions of a linear equation system by backward substitution. Matrix must be an upper triangular matrix.
U * x = b
Syntax #
math.usolveAll(U, b)
Parameters #
| Parameter | Type | Description |
|---|---|---|
U |
Matrix, Array | A N x N matrix or array (U) |
b |
Matrix, Array | A column vector with the b values |
Returns #
| Type | Description |
|---|---|
| DenseMatrix[] | Array[] | An array of affine-independent column vectors (x) that solve the linear system |
Examples #
const a = [[-2, 3], [2, 1]]
const b = [11, 9]
const x = usolveAll(a, b) // [ [[8], [9]] ]