Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.04 KB

README.md

File metadata and controls

51 lines (36 loc) · 1.04 KB

Eigenvalue

JavaScript Wrapper for eigenvalues and eigenvectors using LAPACK.

The left and right eigenvectors are normalize meaning that the largest components are made real. This is done using the Lapack dgeev method.

Install

npm install matrix-eig

Example

var matrixEig = require('matrix-eig');

var matrix = [[0, 1],[-2, -3]]
var result = matrixEig.eig(matrix);

console.log(result.eigenvalues.real);
// Float64Array [ -1, -2 ]

console.log(result.eigenvalues.imaginary);
// Float64Array [ 0, 0 ]

console.log(result.eigenvectors.left);
//  Float64Array [
//       0.8944271909999159,
//       0.4472135954999579,
//       0.7071067811865475,
//       0.7071067811865475 ]

console.log(result.eigenvectors.right);
// Float64Array [
//       0.7071067811865475,
//       -0.7071067811865475,
//       -0.4472135954999579,
//       0.8944271909999159 ]

References

For more detail, see:

License

© 2018 Riccardo Corradin, ISC.