Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Torsten
Posts:
1,717
Registered:
11/8/10


Re: how to Solve coupled ODEs
Posted:
Feb 8, 2013 2:47 AM


"Henry" wrote in message <kf0n7c$k5i$1@newscl01ah.mathworks.com>... > Hi Torsten, > Would you kindly indicate which are the mistakes in my code? > thanks! Henry
Just compare line for line:
global a b c d e a=...; b=...; c=...; d=...; e=...; [t,y] = ode45(@odeeqns, [0 3], [1 1]); function dyds = odeeqns(s,y) global a b c d e dyds = zeros(2,1) dyds(1,1) = 1/y(1) *(y(2)*(d+s /y(2))a *y(1)*sqrt(y(1)^2+(e+y(2))^2)); dyds(2,1) = (y(2)*(b+y(2))*sqrt(y(1)^2+(e+y(2))^2))/y(1)y(2)/s  c;
Best wishes Torsten.



