-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Description
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:
const M = [[11200, 5600], [5600, 4800]];
const eig = numeric.eig(M);
console.log(eig.lamba.x, eig.E.x);yields:
(2) [14449.80619863884, 1550.1938013611607]
0: 14449.80619863884
1: 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]Metadata
Metadata
Assignees
Labels
No labels