Eig command returning wrong eigenvectors?
Show older comments
Hi!
I am very new to using Matlab, so this question might seem silly.
I have a matrix:
K =
-7 -18 -18 9 27
0 3 0 0 0
-8 -12 -5 7 17
-10 -16 -20 10 25
-6 -10 -6 6 17
My goal is to calculate the eigenvectors and eigenvalues, which I attempt by using the command
[M,N] = eig(A)
This command gives my two new matrices, one with the values and the other with the vectors. I get the right results for the values: 2, 3 and 5 (3 and 5 twice) but the vectors aren't correct:
M =
273/1520 * 647/2153 -509/586 *
0 0 0 0 310/409
-273/1520 888/2737 2811/5162 266/1651 283/1695
273/304 -2220/2737 -847/1906 -452/1003 -293/7624
-273/760 1332/2737 813/1261 -446/3473 873/1387
The vectors should instead be something along the lines of (-1/2,0,1/2,-5/2,1).
What am I doing wrong? (I am assuming it's me and not the program)
Thanks in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!