Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I have a problem with the eigenvals() function. USALLY the results are sorted from largest to smallest, but occasionally they will be out of order. I have found the following simple matrix that demonstrates this:
[A] = 1.0053 1.0053 1.0053
1.0053 2.0001 2.0001
1.0053 2.0001 3.4365
eigenvals(A) = {5.301 0.337 0.803}
This can be a tremendous problem if, for example, I have a 100x100 matrix and I only need the first 3 eigenvalues and their associated eigenvectors.
See attached mathcad sheet with demo and illustration of what I go through to sort the values and vectors properly. Surely there must be a better way!
Your updated post fails when used with Mcad 14, see attached pdf. I had trouble with Ian Ward's sorting process when I moved from Mcad 11 to 14, it sometimes found complex number frequencies before the lowest ones sought. So I amended it to weed out any complex results, as shown.
hi bill,
yeah, the order aspect was one of the things i changed to work with mathcad 15.