Hi just want to know if someone can maybe help me i have this matrix t want to get the eigenvector but it give me complex values and im pretty sure it must not be complex values for that matrix

조회 수: 1 (최근 30일)
t= zeros(10);
t(1,2)=1;
t(1,5:10) = 1;
t(2,3:6) = 1;
t(2,8:10)=1;
t(3,1)=1;
t(3,4)=1;
t(3,7:10)=1;
t(4,6:10) =1;
t(5,3:4)=1;
t(5,7:8)=1;
t(5,10)=1;
t(6,3)=1;
t(6,9:10)=1;
t(7,2)=1;
t(7,6)=1;
t(7,10)=1;
t(8,7)=1;
t(8,9)=1;
t(8,10)=1;
t(9,5)=1;
t(9,10)=1;
t
P = eig(t)
  댓글 수: 3
Corne Lourens
Corne Lourens 2019년 8월 23일
Yes its a prac and in the prac they tell us that the eigenvector only has real entries

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

답변 (1개)

Christine Tobler
Christine Tobler 2019년 8월 23일
A simple way to verify if the returned eigenvalues are correct is to compute both the eigenvalues and the eigenvectors, and to compute the residual:
>> [U, D] = eig(t);
>> norm(t*U - U*D)
ans =
5.3327e-15
This is close to machine precision, a good indication that the eigenproblem was solved correctly.
Here are the computed eigenvalues:
>> diag(D)
ans =
2.8990 + 0.0000i
-0.5340 + 1.7329i
-0.5340 - 1.7329i
-0.0934 + 1.1346i
-0.0934 - 1.1346i
-0.6504 + 0.7179i
-0.6504 - 0.7179i
-0.1716 + 0.3782i
-0.1716 - 0.3782i
0.0000 + 0.0000i
For a non-symmetric matrix, it's possible that MATLAB would return eigenvalues with a small imaginary part (around 1e-15) for a matrix with real eigenvalues (as all numerical methods are subject to some numerical tolerance, and we only use an algorithm that guarantees real eigenvalues in the symmetric case). But the eigenvalues here are clearly not close to symmetric at all.
I'm afraid the matrix t doesn't have real eigenvalues. Maybe your exercise is only interested in the two eigenvectors that are connected to the real eigenvalues, 2.8990 and 0?

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by