Matlab eig 是否总是返回排序值? [英] Does Matlab eig always returns sorted values?

查看:52
本文介绍了Matlab eig 是否总是返回排序值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Matlab 中使用了一个函数:

I use a function at Matlab:

[V,D] = eig(C);

我看到 V 和 D 总是按升序排序.它总是这样还是应该在我获得 VD 值后对它们进行排序?

I see that V and D are always sorted ascending order. Does it always like that or should I sort them after I get V and D values?

推荐答案

V 不按任何顺序排序,除了对应于关联特征值的顺序.但也许你不是那个意思.

V is NOT sorted in any order, except to correspond to the order of the associated eigenvalues. But perhaps you did not mean that.

特征值倾向于按降序排列,但这根本不能保证.它们往往是有序的,因为最大的往往会从最上面的算法中流出.Eig 最后没有排序来确保这一事实.

The eigenvalues TEND to be in descending order, but this is not assured at all. They tend to be in order because the largest tend to trickle out of the algorithm on top. Eig has no sort at the end to ensure that fact.

我可能会指出 eigenshuffle 工具,旨在采取一系列特征问题,然后对特征值(和相应的特征向量)进行排序,使它们在序列中保持一致.

I might point out the eigenshuffle tool, designed to take a sequence of eigenproblems, then resorting the eigenvalues (and the corresponding eigenvectors) so they are consistent along the sequence.

如果您确实确实需要按降序排列它们,请进行排序以确保这一事实.确保您也按相同顺序对向量进行排序.

If you really need them certainly in decreasing order, then do a sort to ensure that fact. Make sure you also sort the vectors in the same order.

这篇关于Matlab eig 是否总是返回排序值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆