sloisel / numeric

Numerical analysis in Javascript
http://www.numericjs.com/
Other
1.42k stars 176 forks source link

Error when calculating eigenvalue matrix beyond 5x5 #55

Open QueueHammer opened 9 years ago

QueueHammer commented 9 years ago

When I try to calculate a eigenvalue matrix for an matrix beyond 5x5 I get an error. In the test the matrix is populated entirely by 1s. This is the default case in my use case, before users would change the values of the input matrix.

Attached is an example: http://jsbin.com/gixir/1/edit?js,console

sloisel commented 9 years ago

Hi. Your matrix has a repeated eigenvalue. This is a known bug.

I'll try to fix it.

On Tue, Aug 12, 2014 at 6:21 PM, Christopher Smith <notifications@github.com

wrote:

When I try to calculate a eigenvalue matrix for an matrix beyond 5x5 I get an error. In the test the matrix is populated entirely by 1s. This is the default case in my use case, before users would change the values of the input matrix.

Attached is an example: http://jsbin.com/gixir/1/edit?js,console

— Reply to this email directly or view it on GitHub https://github.com/sloisel/numeric/issues/55.

Sébastien Loisel Assistant Professor Department of Mathematics, Heriot-Watt University Riccarton, EH14 4AS, United Kingdom web: http://www.ma.hw.ac.uk/~loisel/ email: S.Loisel at hw.ac.uk phone: +44 131 451 3234 fax: +44 131 451 3249

georglind commented 7 years ago

If your matrix is real symmetric (hermitian), you can use the jacobi solver that I implemented in a fork of this project. It deals perfectly with repeated eigenvalues.

My fork: https://github.com/georglind/numeric.