Skip to content

Calculate the eigenvalue and eigenvector of a matrix

Notifications You must be signed in to change notification settings

corradin/Eigenvalue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Calculate the eigenvalue and eigenvector of a matrix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published