JSFiddle - React, Tailwind, and code Playground

by zx22516969

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js"></script>

JavaScript

// Linear algebra example. We start with a matrix.
var A = [
  [2, -1],
  [-1, 2]
];

// solve Ax = b
var x = [1,0];
var b = numeric.dot (A,x);
var xx = numeric.solve (A,b);
console.log (xx);

// compute det(A)
console.log (numeric.det(A));



// Eigenvalues.
var ev = numeric.eig(A);