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

1 Ansicht (letzte 30 Tage)
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.

Antworten (1)

Walter Roberson
Walter Roberson am 30 Jan. 2014
Bearbeitet: Walter Roberson am 30 Jan. 2014
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 Kommentar
Walter Roberson
Walter Roberson am 30 Jan. 2014
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by