如何用matlab求这个矩阵的特征值和特征向量呢?

2024-11-27 18:34:01
推荐回答(2个)
回答(1):

20个太多,用2个举例:

clc;clear
m=1;n=2;
for X=1:n
for Y=1:n
for Z=1:n
A(:,:,m)=[0 -1 X 0;1 0 0 X;Y 0 Z/Y -1;0 Y 1 Z/X];
[V(:,:,m),d(:,:,m)]=eig(A(:,:,m))
m=m+1;
end
end
end

结果:

V(:,:,1) =

0.0000 + 0.6015i 0.0000 - 0.6015i 0.3717 + 0.0000i 0.3717 - 0.0000i
0.6015 0.6015 -0.0000 - 0.3717i -0.0000 + 0.3717i
-0.0000 - 0.3717i -0.0000 + 0.3717i 0.6015 0.6015
-0.3717 + 0.0000i -0.3717 - 0.0000i -0.0000 - 0.6015i -0.0000 + 0.6015i

V(:,:,2) =

-0.6533 -0.6533 0.2706 + 0.0000i 0.2706 - 0.0000i
0.0000 + 0.6533i 0.0000 - 0.6533i -0.0000 - 0.2706i -0.0000 + 0.2706i
0.2706 + 0.0000i 0.2706 - 0.0000i 0.6533 0.6533
-0.0000 - 0.2706i -0.0000 + 0.2706i -0.0000 - 0.6533i -0.0000 + 0.6533i

V(:,:,3) =

0.0527 - 0.3450i 0.0527 + 0.3450i -0.4661 + 0.0198i -0.4661 - 0.0198i
-0.3238 - 0.0141i -0.3238 + 0.0141i 0.0517 + 0.4846i 0.0517 - 0.4846i
0.1132 - 0.5975i 0.1132 + 0.5975i 0.5407 0.5407
-0.6351 -0.6351 -0.0717 - 0.4974i -0.0717 + 0.4974i

V(:,:,4) =

0.1041 - 0.2772i 0.1041 + 0.2772i -0.0501 + 0.5145i -0.0501 - 0.5145i
-0.2482 - 0.0204i -0.2482 + 0.0204i 0.5498 0.5498
0.2535 - 0.5790i 0.2535 + 0.5790i 0.0867 - 0.4927i 0.0867 + 0.4927i
-0.6714 -0.6714 -0.4237 + 0.0265i -0.4237 - 0.0265i

V(:,:,5) =

0.6337 0.6337 -0.0539 - 0.4971i -0.0539 + 0.4971i
0.0386 - 0.6054i 0.0386 + 0.6054i -0.5384 -0.5384
-0.3265 + 0.0121i -0.3265 - 0.0121i -0.0740 - 0.4843i -0.0740 + 0.4843i
-0.0373 + 0.3496i -0.0373 - 0.3496i -0.4688 - 0.0167i -0.4688 + 0.0167i

V(:,:,6) =

0.6681 0.6681 0.4123 + 0.0339i 0.4123 - 0.0339i
0.0609 - 0.6253i 0.0609 + 0.6253i 0.1729 - 0.4606i 0.1729 + 0.4606i
-0.2574 + 0.0161i -0.2574 - 0.0161i 0.5578 0.5578
-0.0527 + 0.2994i -0.0527 - 0.2994i 0.2106 - 0.4810i 0.2106 + 0.4810i

V(:,:,7) =

0.5301 0.5301 -0.4680 - 0.0000i -0.4680 + 0.0000i
0.0000 - 0.5301i 0.0000 + 0.5301i -0.0000 + 0.4680i -0.0000 - 0.4680i
-0.4680 + 0.0000i -0.4680 - 0.0000i -0.5301 -0.5301
-0.0000 + 0.4680i -0.0000 - 0.4680i -0.0000 + 0.5301i -0.0000 - 0.5301i

V(:,:,8) =

-0.5573 -0.5573 -0.0000 + 0.4352i -0.0000 - 0.4352i
0.0000 + 0.5573i 0.0000 - 0.5573i 0.4352 + 0.0000i 0.4352 - 0.0000i
0.4352 + 0.0000i 0.4352 - 0.0000i -0.0000 + 0.5573i -0.0000 - 0.5573i
-0.0000 - 0.4352i -0.0000 + 0.4352i 0.5573 0.5573

d(:,:,1) =

-0.6180 + 1.0000i 0 0 0
0 -0.6180 - 1.0000i 0 0
0 0 1.6180 + 1.0000i 0
0 0 0 1.6180 - 1.0000i

d(:,:,2) =

-0.4142 + 1.0000i 0 0 0
0 -0.4142 - 1.0000i 0 0
0 0 2.4142 + 1.0000i 0
0 0 0 2.4142 - 1.0000i

d(:,:,3) =

1.8415 + 0.9852i 0 0 0
0 1.8415 - 0.9852i 0 0
0 0 -1.0915 + 0.9933i 0
0 0 0 -1.0915 - 0.9933i

d(:,:,4) =

2.3617 + 0.9230i 0 0 0
0 2.3617 - 0.9230i 0 0
0 0 -0.8617 + 0.9840i 0
0 0 0 -0.8617 - 0.9840i

d(:,:,5) =

-1.0915 + 0.9933i 0 0 0
0 -1.0915 - 0.9933i 0 0
0 0 1.8415 + 0.9852i 0
0 0 0 1.8415 - 0.9852i

d(:,:,6) =

-0.8617 + 0.9840i 0 0 0
0 -0.8617 - 0.9840i 0 0
0 0 2.3617 + 0.9230i 0
0 0 0 2.3617 - 0.9230i

d(:,:,7) =

-1.7656 + 1.0000i 0 0 0
0 -1.7656 - 1.0000i 0 0
0 0 2.2656 + 1.0000i 0
0 0 0 2.2656 - 1.0000i

d(:,:,8) =

-1.5616 + 1.0000i 0 0 0
0 -1.5616 - 1.0000i 0 0
0 0 2.5616 + 1.0000i 0
0 0 0 2.5616 - 1.0000i

回答(2):

[V,d]=eig(A)
d为特征值
V的列向量为对应特征值的特征向量