mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.2 KiB
1.2 KiB
| layout |
|---|
| default |
Function usolve #
Solves the linear equation system by backward substitution. Matrix must be an upper triangular matrix.
U * x = b
Syntax #
math.usolve(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 | A column vector with the linear system solution (x) |
Examples #
var a = [[-2, 3], [2, 1]];
var b = [11, 9];
var x = usolve(a, b); // [[8], [9]]