Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: (yet unsolved) how to Solve coupled ODEs
Replies: 4   Last Post: Feb 13, 2013 4:11 AM

 Messages: [ Previous | Next ]
 Steven Lord Posts: 18,038 Registered: 12/7/04
Re: (yet unsolved) how to Solve coupled ODEs
Posted: Feb 12, 2013 3:04 PM

"Henry " <mflacius1521@gmail.com> wrote in message
news:kfe1ft\$mlu\$1@newscl01ah.mathworks.com...
> hi, I tried the following
>
> [T,sols] = ode45(@yprime, [1 20],0.000001*ones(1,40)');
>
> function dyds = odeeqns(s,y)
> global a b c d
> dyds1 = 1./y(1) .*(y(2) .* (d + y(2)./ s) - a .* y(1) .* sqrt(y(1).^2 +
> (b + y(2)).^2));
> dyds2 = - (y(2) .* (b + y(2)) .* sqrt(y(1).^2 + (b + y(2)).^2))./y(1) -
> y(2)./s - c;
> dyds = [dyds1 dyds2];
> size(dyds) % 1 x 40

An array with 1 row and 40 columns is a vector, but it is not a COLUMN
vector.

An array with 40 rows and 1 column is a column vector.

--
Steve Lord
slord@mathworks.com