如何在MATLAB中找到两个矩阵的联合特征值? [英] How can I find the joint eigenvalues of two matrices in MATLAB?
问题描述
如果将矩阵 A 和 B 的联合特征值定义为方程的根 det(lambda * A - B )= 0, 如何在MATLAB中解决此问题?
If the joint eigenvalues of matrices A and B are defined as the roots of the equation det(lambda * A - B) = 0, how can I solve this in MATLAB?
尤其是,我不确定如何定义lambda -它显然需要是矩阵或向量,否则将只有一个联合特征值.另外,我不确定是否有内置函数,或者是否需要使用fzero来查找非线性函数的根.
In particular, I am not sure how exactly lambda is defined - it obviously needs to be a matrix or vector, as otherwise there would only be one joint eigenvalue. Also, I am not sure if there is any in-built function, or if, say, fzero for finding the roots of nonlinear functions needs to be used.
推荐答案
为此提供了一个内置函数.
There is a built-in function for this.
http://www.mathworks.com/help/matlab/ref/eig.html
[V,D] = eig(B,A);
[V,D] = eig(A,B)
解决系统det(A - lambda*B) == 0
.但是,要解决的理想系统是det(A*lambda - B) == 0
,因此将输入反向以尊重对此系统的解决.
[V,D] = eig(A,B)
solves the system det(A - lambda*B) == 0
. However, the desired system to solve is det(A*lambda - B) == 0
and so the inputs are reversed to respect solving this system.
这篇关于如何在MATLAB中找到两个矩阵的联合特征值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!