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

查看:595
本文介绍了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.

特征值TEND按降序排列,但这一点不能保证.它们之所以井然有序,是因为最大的趋向于从最上面的算法中滴出来.艾格(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天全站免登陆