필터 지우기
필터 지우기

How to determine eigenvalues and eigenvectors?

조회 수: 11 (최근 30일)
Md Ashikuzzaman
Md Ashikuzzaman 2022년 7월 13일
편집: Abderrahim. B 2022년 7월 13일
I have two matrices for example A and B. A=[3,9;3,5] and B=[2,0;0,8].
They are part of an eigenvalue problem of the form: (A-(lambda)B)x=0.
How do I find the eigenvalues and vectors using matlab? Please solve this problem using values and sharee the code from your monitor if possible.

채택된 답변

Bruno Luong
Bruno Luong 2022년 7월 13일
편집: Bruno Luong 2022년 7월 13일
A=[3,9;3,5]
A = 2×2
3 9 3 5
B=[2,0;0,8]
B = 2×2
2 0 0 8
[V lambda] = eig(A,B,'vector')
V = 2×2
1.0000 -1.0000 0.2074 0.4018
lambda = 2×1
2.4332 -0.3082
% here is the first eigen vector with lambda(1) the corresponfing eigen
% value
x1 = V(:,1)
x1 = 2×1
1.0000 0.2074
(A - lambda(1)*B)*x1 % small but not 0 due to finite precision floating point
ans = 2×1
1.0e-15 * 0.2220 -0.4441
% second eigen vector and second eigen value lambda(2)
x2 = V(:,2)
x2 = 2×1
-1.0000 0.4018
(A - lambda(2)*B)*x2 % small but not 0 due to finite precision floating point
ans = 2×1
1.0e-15 * 0.8882 0.4441

추가 답변 (2개)

Abderrahim. B
Abderrahim. B 2022년 7월 13일
편집: Abderrahim. B 2022년 7월 13일
Use eig
A = [3,9;3,5];
[eVecs, eVals] = eig(A)
eVecs = 2×2
-0.9026 -0.8196 0.4304 -0.5729
eVals = 2×2
-1.2915 0 0 9.2915
Eigenvalues are the diagonal elements of eVals. To get them use diag
eValues = diag(eVals)
eValues = 2×1
-1.2915 9.2915

Chunru
Chunru 2022년 7월 13일
% doc eig for more details
A=[3,9;3,5]
A = 2×2
3 9 3 5
B=[2,0;0,8]
B = 2×2
2 0 0 8
[vA, dA] = eig(A)
vA = 2×2
-0.9026 -0.8196 0.4304 -0.5729
dA = 2×2
-1.2915 0 0 9.2915
[vB, dB] = eig(B)
vB = 2×2
1 0 0 1
dB = 2×2
2 0 0 8

카테고리

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