sigma665 发表于 2011-12-17 22:11:49

关于广义特征值eig(A,B)和eig(inv(B)*A)

% 计算特征值
clear all
clc

c44=43e9;
e15=11.6;
k11=11.2e-9;
d11=0;
q11=550;
u11=590e-6;

S=[c44 e15q11;
    e15 -k11 -d11;
    q11 -d11 -u11];
R=[0 0 0;
    0 0 0;
    0 0 0];
W=S;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 检验特征值用
syms p
F=det(S+p*(R+R.')+p^2*W);
pp=roots(sym2poly(F));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


I=eye(3,3);
O=zeros(3,3);

N1=[-R.' I;-S O];
N2=;
N=inv(N2)*N1;

=eig(N);
=eig(N1,N2,'qz');v1 =

Columns 1 through 5

   0.0000 - 0.0000i   0.0000 + 0.0000i-0.0000 - 0.0000i-0.0000 + 0.0000i   0.0000 - 0.0000i
-0.0001 - 0.0093i-0.0001 + 0.0093i-0.0200 - 0.0445i-0.0200 + 0.0445i-0.0462 + 0.1031i
-0.0000 - 0.0000i-0.0000 + 0.0000i   0.0019 - 0.0003i   0.0019 + 0.0003i-0.0005 + 0.0001i
   1.0000             1.0000             0.9988             0.9988            -0.9936         
   0.0000 + 0.0000i   0.0000 - 0.0000i-0.0000 + 0.0000i-0.0000 - 0.0000i   0.0000 + 0.0000i
-0.0000 + 0.0000i-0.0000 - 0.0000i-0.0000 - 0.0000i-0.0000 + 0.0000i   0.0000 + 0.0000i

Column 6

   0.0000 + 0.0000i
-0.0462 - 0.1031i
-0.0005 - 0.0001i
-0.9936         
   0.0000 - 0.0000i
   0.0000 - 0.0000i


d1 =

Columns 1 through 5

   0.0000 + 1.0000i      0                  0                  0                  0         
      0             0.0000 - 1.0000i      0                  0                  0         
      0                  0             0.0000 + 1.0000i      0                  0         
      0                  0                  0             0.0000 - 1.0000i      0         
      0                  0                  0                  0             0.0000 + 1.0000i
      0                  0                  0                  0                  0         

Column 6

      0         
      0         
      0         
      0         
      0         
   0.0000 - 1.0000iv2 =

Columns 1 through 5

      0 - 0.0000i      0 + 0.0000i   0.0000             0.0000             0.0000 + 0.0000i
      0                  0            -1.0000            -1.0000            -0.0001 - 0.0000i
      0                  0             0.0001             0.0001            -1.0000 + 0.0000i
   1.0000             1.0000                  0             0.0000            -0.0000 - 0.0000i
   0.0000             0.0000                  0            -0.0000            -0.0000 + 0.0000i
   0.0000             0.0000                  0            -0.0000            -0.0000 + 0.0006i

Column 6

   0.0000 - 0.0000i
-0.0001 + 0.0000i
-1.0000 - 0.0000i
-0.0000 + 0.0000i
-0.0000 - 0.0000i
-0.0000 - 0.0006i

d2 =

Columns 1 through 5

      0 + 1.0000i      0                  0                  0                  0         
      0                  0 - 1.0000i      0                  0                  0         
      0                  0                  0                  0                  0         
      0                  0                  0                  0                  0         
      0                  0                  0                  0                  0 + 1.0000i
      0                  0                  0                  0                  0         

Column 6

      0         
      0         
      0         
      0         
      0         
      0 - 1.0000iAx=pBx 广义特征值
inv(B)*Ax=px 普通特征值

按理说,特征值应该是一样的。可是eig(A,B)求的的特征值显然不是我要求得到的。
如果用普通特征值求,需要求逆,而矩阵出现奇异,结果不精确。

这到底是怎么回事呢??

ChaChing 发表于 2011-12-19 16:32:19

Warning: Matrix is close to singular or badly scaled.
         Results may be inaccurate.
都已经告诉LZ不準确了, 再去两者比较有意义吗?

sigma665 发表于 2011-12-20 12:44:03

ChaChing 发表于 2011-12-19 16:32 static/image/common/back.gif
都已经告诉LZ不準确了, 再去两者比较有意义吗?

问题是,虽然有警告提示,但是结果是对的。
反而广义特征值不对。
页: [1]
查看完整版本: 关于广义特征值eig(A,B)和eig(inv(B)*A)