mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
---
|
|
layout: default
|
|
---
|
|
|
|
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|
|
|
|
<h1 id="function-lsolveall">Function lsolveAll <a href="#function-lsolveall" title="Permalink">#</a></h1>
|
|
|
|
Finds all solutions of a linear equation system by forwards substitution. Matrix must be a lower triangular matrix.
|
|
|
|
`L * x = b`
|
|
|
|
|
|
<h2 id="syntax">Syntax <a href="#syntax" title="Permalink">#</a></h2>
|
|
|
|
```js
|
|
math.lsolveAll(L, b)
|
|
```
|
|
|
|
<h3 id="parameters">Parameters <a href="#parameters" title="Permalink">#</a></h3>
|
|
|
|
Parameter | Type | Description
|
|
--------- | ---- | -----------
|
|
`L` | Matrix, Array | A N x N matrix or array (L)
|
|
`b` | Matrix, Array | A column vector with the b values
|
|
|
|
<h3 id="returns">Returns <a href="#returns" title="Permalink">#</a></h3>
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
DenseMatrix[] | Array[] | An array of affine-independent column vectors (x) that solve the linear system
|
|
|
|
|
|
<h3 id="throws">Throws <a href="#throws" title="Permalink">#</a></h3>
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
|
|
|
|
<h2 id="examples">Examples <a href="#examples" title="Permalink">#</a></h2>
|
|
|
|
```js
|
|
const a = [[-2, 3], [2, 1]]
|
|
const b = [11, 9]
|
|
const x = lsolveAll(a, b) // [ [[-5.5], [20]] ]
|
|
```
|
|
|
|
|
|
<h2 id="see-also">See also <a href="#see-also" title="Permalink">#</a></h2>
|
|
|
|
[lsolve](lsolve.html),
|
|
[lup](lup.html),
|
|
[slu](slu.html),
|
|
[usolve](usolve.html),
|
|
[lusolve](lusolve.html)
|