函数 lsolve #

通过前向替换找到线性方程组的一个解。矩阵必须是下三角矩阵。如果无解则抛出错误。

L * x = b

Syntax #

math.lsolve(L, b)

Parameters #

Parameter Type Description
L 矩阵, 数组 一个 N x N 的矩阵或数组 (L)
b 矩阵, 数组 一个包含 b 值的列向量

Returns #

Type Description
DenseMatrix | Array 包含线性方程组解的列向量 (x)

Throws #

Type | Description —- | ———–

Examples #

const a = [[-2, 3], [2, 1]]
const b = [11, 9]
const x = lsolve(a, b)  // [[-5.5], [20]]

另请参阅 #

lsolveAll, lup, slu, usolve, lusolve

Fork me on GitHub