Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Solving a system of three coupled linear diff equations
Replies: 9   Last Post: Jan 15, 2014 2:15 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Torsten

Posts: 1,439
Registered: 11/8/10
Re: Solving a system of three coupled linear diff equations
Posted: Jan 14, 2014 9:44 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Peter " <c4359385@drdrb.com> wrote in message <lb3hr5$e12$1@newscl01ah.mathworks.com>...
> Hm, this gives me
>
> Error using char
> Cell elements must be character arrays.
>
> Error in dsolve>mupadDsolve (line 279)
> if isvarname(char(args{end}))
>
> Error in dsolve (line 186)
> sol = mupadDsolve(args, options);
>
> Error in SpinLifetimes (line 23)
> Y = dsolve({diff(M1) == -p1*M1+p2*M2, diff(M2) == -(p2+p3)*M2+p1*M1+p4*M3, diff(M3)
> == -p4*M3+p3*M2}, {M1(0) == 1, M2(0) == 0, M3(0) ==0});
>
> I don't really see what that means in this context, why does it need something to be a character?


Maybe like this:
p1 = 0.05;
p2 = 0.05;
p3 = 0.05;
p4 = 0.05;
syms M1(t) M2(t) M3(t)
Y = dsolve(diff(M1) == -p1*M1+p2*M2, diff(M2) == -(p2+p3)*M2+p1*M1+p4*M3, diff(M3) == -p4*M3+p3*M2, M1(0) == 1, M2(0) == 0, M3(0) ==0)

Best wishes
Torsten.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.