Determine eigvector through eigvalue without using eig

조회 수: 1 (최근 30일)
Iakovos Antonoglou
Iakovos Antonoglou 2018년 12월 20일
답변: Torsten 2018년 12월 20일
Hello. I am writing a script that uses the power method to calculate the principal and two lowest (or however the oposite of principal is) eigvalues of a couple of matrices.
For the last part i want to plot the eigvectors of the corresponding eigvalues but i dont want to use eig and havent been able to successfully use find to determine the position of the eigvals and therefore find the corresponding eigvectors.
Long story short i am looking for a way, in general, to find the corresponding eigvector of a matrix by only knowing the matrix and one of its eigvalues.
P.S. I think the code is irrelevant but just in case
clear
clc
format short
f = @(x) 2+sin(pi*x)
n=100
N=[1:n];
for i=1:n;
x(i)=i/n;
end
E=f(x);
K=-2*E;
L=E(1:n-1);
M=E(2:n);
A=diag(K)+diag(L,1)+diag(M,-1);
k=3000;
yo=ones(n,1);
for i=1:k
dian=A*yo;
yo=dian./max(abs(dian));
end
dian
disp('H megisth kata apolith timh idiotimh tou pinaka A einai:')
max(abs(dian))
max(abs(eig(A)))
B=(n^2)*A;
for i=1:k
dianB=B*yo;
yo=dianB./max(abs(dianB));
end
disp('H megisth kata apolith timh idiotimh tou pinaka B einai:')
max(abs(dianB))
max(abs(eig(B)))
Binv=inv(B);
for i=1:k
dianBinv=Binv*yo;
yo=dianBinv./max(abs(dianBinv));
end
disp('H elaxisth kata apolith timh idiotimh tou pinaka B einai:')
max(abs(dianBinv))
max(abs(eig(Binv)))

답변 (2개)

Torsten
Torsten 2018년 12월 20일
By definition, the eigenvectors are the null space of A-lambda*I.
Thus you can get the eigenvectors by
null(A-lambda*eye(size(A,1)))
Best wishes
Torsten.

Bruno Luong
Bruno Luong 2018년 12월 20일
null(A - lambda * eye(size(A))

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by