1.1.1 • Published 8 years ago

linear-equation-system v1.1.1

Weekly downloads
31
License
MIT
Repository
-
Last release
8 years ago

linear-equation-system

An simple solver for a linear equation system.

Example

var linSystem = require("linear-equation-system");

var A =[[0,-1,1],
	[-1,3,0],
	[2,0,6]];

var B = [2,5,20];

console.log(linSystem.solve(A, B));

Output:

[-0.5, 1.5, 3.5]

Info

This module uses the Gauss-Jordan elimination method. It is meant to solve an Ax=B type system. If the system is inconsistent, the method returns false.

Install

npm i linear-equation-system