Can someone run this simple code for me? Matlab isn't converging to a solution on my computer...

1 次查看(过去 30 天)
A = [0 1 0 0; 1 .15 -2 -.05; 0 0 0 1; -1 -.025 -.5 -.075]
t = sym('t')
expm(A*t)
Thanks in advance! Apparently it should work, but I guess finding the state-transition matrix for when A is a 4 x 4 matrix is pretty computationally taxing for Matlab.

回答(1 个)

Walter Roberson
Walter Roberson 2014-1-30
编辑:Walter Roberson 2014-1-30
I suggest experimenting with
expm(sym(A,'d') * t)
the sym(,'d') tells MuPAD to treat the numbers as decimals instead of doing the default of converting to rational. My tests suggest that doing the calculation with rationals might be considerably more time consuming.
  1 个评论
Walter Roberson
Walter Roberson 2014-1-30
Technical compatibility note:
When you use the MATLAB expm() interface to MuPAD, you do want to multiply your input values by "t", as Kelsey shows. Likewise, if you go down into the MuPAD level to find the built-in MuPAD expm, your numeric input should be multiplied by "t" in the manner shown.
If, though, you happen to use Maple, then Maple's MTM:-expm() function should only be passed the numeric values, as it will add the "t" itself.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by