How to determine eigenvalues and eigenvectors?
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Md Ashikuzzaman
le 13 Juil 2022
Modifié(e) : Abderrahim. B
le 13 Juil 2022
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.
0 commentaires
Réponse acceptée
Bruno Luong
le 13 Juil 2022
Modifié(e) : Bruno Luong
le 13 Juil 2022
A=[3,9;3,5]
B=[2,0;0,8]
[V lambda] = eig(A,B,'vector')
% here is the first eigen vector with lambda(1) the corresponfing eigen
% value
x1 = V(:,1)
(A - lambda(1)*B)*x1 % small but not 0 due to finite precision floating point
% second eigen vector and second eigen value lambda(2)
x2 = V(:,2)
(A - lambda(2)*B)*x2 % small but not 0 due to finite precision floating point
0 commentaires
Plus de réponses (2)
Abderrahim. B
le 13 Juil 2022
Modifié(e) : Abderrahim. B
le 13 Juil 2022
Use eig
A = [3,9;3,5];
[eVecs, eVals] = eig(A)
Eigenvalues are the diagonal elements of eVals. To get them use diag
eValues = diag(eVals)
0 commentaires
Chunru
le 13 Juil 2022
% doc eig for more details
A=[3,9;3,5]
B=[2,0;0,8]
[vA, dA] = eig(A)
[vB, dB] = eig(B)
0 commentaires
Voir également
Catégories
En savoir plus sur Linear Algebra dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!