UNPKG

815 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function usolve
4
5Solves the linear equation system by backward substitution. Matrix must be an upper triangular matrix.
6
7`U * x = b`
8
9
10## Syntax
11
12```js
13math.usolve(U, b)
14```
15
16### Parameters
17
18Parameter | Type | Description
19--------- | ---- | -----------
20`U` | Matrix, Array | A N x N matrix or array (U)
21`b` | Matrix, Array | A column vector with the b values
22
23### Returns
24
25Type | Description
26---- | -----------
27DenseMatrix &#124; Array | A column vector with the linear system solution (x)
28
29
30## Examples
31
32```js
33const a = [[-2, 3], [2, 1]]
34const b = [11, 9]
35const x = usolve(a, b) // [[8], [9]]
36```
37
38
39## See also
40
41[lup](lup.md),
42[slu](slu.md),
43[usolve](usolve.md),
44[lusolve](lusolve.md)