- 想用两种方法求解e^A 第一种是直接输入e^A
- 第二种是按照求解步骤进行求解 但是按照第二种方法求出的答案不对啊 请问是怎么回事
>> clear all>> syms e %声明一个变量>> A=[-7 -7 5; -8 -8 -5; 0 -5 0]A = -7 -7 5 -8 -8 -5 0 -5 0
%先调用命令求解e^A>> EA=e^AEA = [ 2/(5*e^5) + e^5/5 + 2/(5*e^15), 2/(5*e^15) - (3*e^5)/10 - 1/(10*e^5), e^5/2 - 1/(2*e^5)][ 3/(5*e^15) - e^5/5 - 2/(5*e^5) , 1/(10*e^5) + (3*e^5)/10 + 3/(5*e^15), 1/(2*e^5) - e^5/2][ e^5/5 - 2/(5*e^5) + 1/(5*e^15), 1/(10*e^5) - (3*e^5)/10 + 1/(5*e^15), 1/(2*e^5) + e^5/2]
%分步求解e^A>> lamad=eig(A) %求解特征值,用以决定对角阵相似还是约旦型相似lamad = -15 -5 5 >> [V D]=eig(A) %求解特征值与特征向量V = 0.5345 -0.5774 0.5774 0.8018 0.5774 -0.5774 0.2673 0.5774 0.5774D = -15.0000 0 0 0 -5.0000 0 0 0 5.0000 >> P=V %P为特征矩阵P = 0.5345 -0.5774 0.5774 0.8018 0.5774 -0.5774 0.2673 0.5774 0.5774 >> Q=inv(P) %inv(P)求解P的逆矩阵Q = 0.7483 0.7483 0 -0.6928 0.1732 0.8660 0.3464 -0.5196 0.8660 >> ED=e^D ED = [1/e^15, 0, 0] [ 0, 1/e^5, 0] [ 0, 0, e^5]>> DA=P*ED*Q DA =[ 2/(5*e^5) + e^5/5 +(2^(1/2)*7^(1/2)*14^(1/2))/(35*e^15), (2^(1/2)*7^(1/2)*14^(1/2))/(35*e^15) -(3*e^5)/10 - 1/(10*e^5), e^5/2 - 1/(2*e^5)] [ 3/(5*e^15) - e^5/5 -2/(5*e^5), 1/(10*e^5) + (3*e^5)/10 + 3/(5*e^15), 1/(2*e^5) - e^5/2 ][ e^5/5 - 2/(5*e^5) + 1/(5*e^15), 1/(10*e^5) -(3*e^5)/10 + 1/(5*e^15), 1/(2*e^5) + e^5/2]
一周热门 更多>