To get dominant eigen vector
古いコメントを表示
In Matlab/Octave, [A B] = eig(C) returns a matrix of eigen vectors and a diagonal matrix of eigen values of C. Even though the values may be theoretically real, these are given to be complex with very low imaginary values. Due to this, the eigen values are not put in a decreasing order. Hence to find the eigen vectors corresponding to dominant eigen values, some calculations are required, which take up processing time in a big loop. Is there a remedy to this to find dominant eigen vectors?
3 件のコメント
Bjorn Gustavsson
2011 年 8 月 28 日
I can't for the life of me believe that finding the largest few real eigenvalues (or the eigenvalues with the larges magnitude or whatever sorting you might need to do on the eigenvalue matrix) might be all that computational intensive compared to the calculations of the eigen-decomposition. That surely has to be a very minor time wasted on doing something like:
[EigvSorted,idx4ES] = sort(diag(real(EigV)));
Pannir Selvam Elamvazhuthi
2011 年 8 月 29 日
Pannir Selvam Elamvazhuthi
2011 年 8 月 29 日
採用された回答
その他の回答 (2 件)
Riley Manfull
2018 年 2 月 9 日
4 投票
[A,B]=eigs(C,1)
1 件のコメント
Savas Erdim
2021 年 4 月 6 日
That worked very well. Thank you Riley!
Christine Tobler
2017 年 5 月 12 日
I realize this is an old post, but this might be helpful to others:
One reason for EIG to return complex values with very small imaginary part, could be that A is very close to, but not exactly, symmetric. In this case,
[U, D] = eig( ( A + A')/2 );
will make EIG treat the input as symmetric, and always return real eigenvalues.
カテゴリ
ヘルプ センター および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!