UNPKG

898 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function lsolve
4
5Finds one solution of a linear equation system by forwards substitution. Matrix must be a lower triangular matrix. Throws an error if there's no solution.
6
7`L * x = b`
8
9
10## Syntax
11
12```js
13math.lsolve(L, b)
14```
15
16### Parameters
17
18Parameter | Type | Description
19--------- | ---- | -----------
20`L` | Matrix, Array | A N x N matrix or array (L)
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 = lsolve(a, b) // [[-5.5], [20]]
36```
37
38
39## See also
40
41[lsolveAll](lsolveAll.md),
42[lup](lup.md),
43[slu](slu.md),
44[usolve](usolve.md),
45[lusolve](lusolve.md)