mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
46 lines (29 loc) • 894 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Finds all solutions of a linear equation system by backward substitution. Matrix must be an upper triangular matrix.
`U * x = b`
```js
math.usolveAll(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[] | An array of affine-independent column vectors (x) that solve the linear system
## Examples
```js
const a = [[-2, 3], [2, 1]]
const b = [11, 9]
const x = usolveAll(a, b) // [ [[8], [9]] ]
```
[ ](usolve.md),
[ ](lup.md),
[ ](slu.md),
[ ](usolve.md),
[ ](lusolve.md)