mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
46 lines (28 loc) • 814 B
Markdown
Solves the linear equation system by backward substitution. Matrix must be an upper triangular matrix.
`U * x = b`
```js
math.usolve(U, b);
```
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
```js
var a = [[-2, 3], [2, 1]];
var b = [11, 9];
var x = usolve(a, b); // [[8], [9]]
```
[](lup.md),
[](slu.md),
[](usolve.md),
[](lusolve.md)
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->