I was trying to figure out why none of the graphics I was plotting lined up correctly, and tracked it down to numeric.js not computing the correct eigenvalues and vectors. For example:
constM=[[11200,5600],[5600,4800]];consteig=numeric.eig(M);console.log(eig.lamba.x,eig.E.x);
yields:
(2)[14449.80619863884,1550.1938013611607]0: 14449.806198638841: 1550.1938013611607(2)[Array(2),Array(2)]0: (2)[-0.8649100931185951,0.5019268181932333]1: (2)[-0.5019268181932334,-0.8649100931185951]
but these eigenvectors seem to have the wrong sign for their [0] coordinate and should instead be:
(2)[Array(2),Array(2)]0: (2)[0.8649100931185951,0.5019268181932333]1: (2)[0.5019268181932334,-0.8649100931185951]
I was trying to figure out why none of the graphics I was plotting lined up correctly, and tracked it down to numeric.js not computing the correct eigenvalues and vectors. For example:
yields:
but these eigenvectors seem to have the wrong sign for their [0] coordinate and should instead be: