There was an error while loading. Please reload this page.
Solves the square linear system A . x == b, returning the solution vector x, or nil if A is (close to) singular.
A . x == b
x
nil
A
x = pymath.solve_linear(A, b)
n × n
n
b
0
pymath.solve_linear
local A = {{2, 1}, {1, 3}} local b = {3, 5} local x = pymath.solve_linear(A, b) -- x == {0.8, 1.4} -- A . x == b local S = {{1, 2}, {2, 4}} -- singular local xs = pymath.solve_linear(S, {1, 1}) -- xs == nil
Minimum PYTHA Version: V27
pymath, pymath.dot, pymath.inverse, pymath.determinant