Finding eigenvector with existing eigenvalues

I have a really simple example, which I would like to use for a better understanding of Eigenvector calculation in Matlab:
A = [3 6; 4 8]
x1 = [0.75; 1]
x2 = [-2; 1]
λ1 = 11
λ2 = 0
Which code do I have to use to have the simple output of x1 & x2?
I've tried several codes I found but always got a strange output:
CODE 1:
A = [4 1; 3 2];
[V,D] = eig(A);
V1 = V(:,1)
V2 = V(:,2)
OUTPUT 1:
v1 = [0.7071; 0.7071]
v2 = [-0.3162; 0.9487]
CODE 2:
A = [4 1; 3 2];
lambda=eig(A); % you should do it by solving det(A-lambda I)=0
V = ones(2);
for k=1:2
B = A-lambda(k)*eye(size(A));
% select pivot column
[~,j] = max(sum(B.^2,1));
othercolumn = 3-j;
V(j,k) = -B(:,j)\B(:,othercolumn);
end
% Optional: Make eigenvectors l2 norm = 1
V = V ./ sqrt(sum(V.^2,1))
OUTPUT 2:
V = [0.7071 -0.3162; 0.7071 0.9487]
May someone help me to get the mentioned outputs x1 = [0.75; 1] & x2 = [-2; 1]?
Thanks!!

댓글 수: 2

you system is not linear indpendent, this means that is infinit eigenvectors. So ur x1 and x2 eig values, are just a case.
Oh I see, thanks!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 6월 12일

댓글:

2021년 6월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by