一般来说,我们可以使用下面的代码来求矩阵的特征值和特征向量
A = magic(3);
[V,D,W] = eig(A)
但是我最近遇到了无法求左特征值的情况
clc,clear,close all
syms rho1 rho2 rho c1 c2 u
A = [rho2/(rho1+rho2)*u -rho1/(rho1+rho2)*u rho1/(rho1+rho2)
-rho2/(rho1+rho2)*u rho1/(rho1+rho2)*u rho2/(rho1+rho2)
c1^2-u^2 c2^2-u^2 2*u];
[V,D,W] = eig(A);
V = simplify(V)
D
W
求出的特征值居然是 [1,2,3],这显然是不对的。
对于这种情况,我采用了曲线救国的策略。众所周知:矩阵 A A A的右特征向量是 A T A^T AT的左特征向量。
所以我们可以求 A T A^T AT 的右特征向量,从而得到 A A A 的左特征向量。
clc,clear,close all
syms rho1 rho2 rho c1 c2 u
A = [rho2/(rho1+rho2)*u -rho1/(rho1+rho2)*u rho1/(rho1+rho2)
-rho2/(rho1+rho2)*u rho1/(rho1+rho2)*u rho2/(rho1+rho2)
c1^2-u^2 c2^2-u^2 2*u];
[V,D] = eig(A.');
V = simplify(V)
矩阵
V
V
V 中的每一列都是矩阵
A
A
A 的一个左特征向量
2023年3月1日11点02分