1 |
|
2 |
|
3 | # Function usolve
|
4 |
|
5 | Solves 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
|
13 | math.usolve(U, b)
|
14 | ```
|
15 |
|
16 | ### Parameters
|
17 |
|
18 | Parameter | 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 |
|
25 | Type | Description
|
26 | ---- | -----------
|
27 | DenseMatrix | Array | A column vector with the linear system solution (x)
|
28 |
|
29 |
|
30 | ## Examples
|
31 |
|
32 | ```js
|
33 | const a = [[-2, 3], [2, 1]]
|
34 | const b = [11, 9]
|
35 | const 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)
|