Eigenvector different to expected using eig
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joshua Tsui
am 4 Mär. 2021
Kommentiert: Joshua Tsui
am 4 Mär. 2021
Hello! The problem is as the title suggests.
A=[1.5 -0.5; -1 1];
[Vec,Val]=eig(A)
The outputted eigenvalues are 2 and 0.5
The outputted eigenvectors are: [0.7071 0.4472; -0.7071 0.8944]
The expected eigenvectors from calculations are (1 2) and (1 -1)
Anyway I can get the expected values ?
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 4 Mär. 2021
A=[1.5 -0.5; -1 1];
[Vec,Val]=eig(A)
What does the eig function return? From its documentation: "[V,D] = eig(A) returns diagonal matrix D of eigenvalues and matrix V whose columns are the corresponding right eigenvectors, so that A*V = V*D." So is A*V close to V*D?
format longg
A*Vec-Vec*Val
Yeah, those are pretty close to 0. How about for your matrix of eigenvectors?
Vec2 = [1 1; 2 -1]
A*Vec2-Vec2*Val
Perhaps, from the orientation of your eigenvectors, you're trying to use the left eigenvectors? "[V,D,W] = eig(A) also returns full matrix W whose columns are the corresponding left eigenvectors, so that W'*A = D*W'."
[Vec, Val, VecLeft] = eig(A);
VecLeft
VecLeft'*A - Val*VecLeft'
Vec2'*A-Val*Vec2'
Still no. So please show me why you believe that the columns of Vec2 are eigenvectors for this matrix.
If we scaled VecLeft a bit it looks a little similar to your Vec2 matrix but not exactly.
VecLeftScaled = VecLeft ./ VecLeft(2, :)
VecLeftScaled'*A-Val*VecLeftScaled'
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!