What's the difference between eig(A,B) and eig(A/B)
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all,
I'm solving a generalized eigenvalue problem Ax=lambda Bx. I can either do eig(A,B) or eig(A/B). The eigenvalues are slightly different obtained from these two methods, and the eigenvectors are totally different. It seems obviously that eig(A/B) can't get the eigenvector correct (since I enforced some boundary conditions in A and B, for eig(A,B) the resultant eigenvectors have the correct boundary conditions, while eig(A/B) doesn't). Do you know why this is the case? Thanks.
2 comentarios
Image Analyst
el 28 de Mzo. de 2015
Why don't you print out A/B to the command line? I think you'll see the reason.
Respuestas (1)
Matt J
el 29 de Mzo. de 2015
Editada: Matt J
el 29 de Mzo. de 2015
The results of eig(A,B) and eig(A/B) can only have any kind of equivalence if B is non-singular, as far as I can see.
Assuming this is true, the eigenvalue results will differ between the two slightly because of floating point precision issues. The eigenvectors will differ by a transformation v=c*B\u where v is an eigenvector from eig(A,B), u is an eigenvector from eig(A/B), and c is an arbitrary complex scalar.
You can test this using the following code. You will see that V1 and V2 contain the same eigenvectors, though perhaps not in the same order,
A=rand(3); B=rand(3);
[V,~]=eig(A,B);
[U,~]=eig(A/B);
V1=bsxfun(@rdivide,V,V(1,:));
V2=(B\U);
V2=bsxfun(@rdivide,V2,V2(1,:));
0 comentarios
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!