![]() Registered Member ![]()
|
Hey, I am using the ComplexEigenSolver in order to calculate the eigenvalues and eigenvectors of a non-symmetric complex matrix.The eigenvalues that i get are not as precise as Matlab gives.More specifically, Matlab gives:
-3,46401798527302e+15 - 1,22954864418393e+15i while Eigen gives: (-3.46402e+015,-1.22955e+015) Is it possible to increase the precision? |
![]() Moderator ![]()
|
It seems that only a printing precision issue. See: http://en.cppreference.com/w/cpp/io/manip/setprecision or http://eigen.tuxfamily.org/dox/structEi ... ormat.html if you' re using Eigen's facilities.
|
![]() Registered Member ![]()
|
You are right!! I guess it was a rookie mistake!!
Thank you for your answer ![]() |
![]() Registered Member ![]()
|
I have another question,though.
The vector ces.eigenvalues() that contains the eigenvalues and the matrix ces.eigenvectors() create a problem to my code because the eigenvalues are sorted from the smallest value to the biggest and the equivalent eigenvectors are sorted as well.But when I slightly change my matrix I can't multiply the eigenvectors form the initial matrix and the slightly changed final matrix because maybe they are sorted a bit differently. Is there a way to get the eigenvalues and eigenvectors without being sorted in any way? |
![]() Moderator ![]()
|
There is no notion of "non-ordered" eigenvalues. Actually ordering them with respect to their magnitude is still the best we can do. Tracking the eigenvalues is actually impossible.
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]