Is it possible to get the eigen values in decreasing order (and the corresponding eigen vector as well) instead of increasing order while using the function eig(X) ?
Show older comments
Is it possible to get the eigen values in decreasing order (and the corresponding eigen vector as well) instead of increasing order while using the function eig(X) ? I need it to apply KLT on an image.
Answers (1)
Walter Roberson
on 15 Oct 2015
1 vote
The order of eigenvalues is not specified and in general will not be sorted (because in general they may be complex)
If you want a particular order you can place them in order afterwards. For example read the full documentation for sort
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!