Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: (yet unsolved) how to Solve coupled ODEs
Date: Tue, 12 Feb 2013 18:26:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <kfe1ft$mlu$1@newscl01ah.mathworks.com>
References: <keujnd$h64$1@newscl01ah.mathworks.com> <kfb8m3$mom$1@newscl01ah.mathworks.com> <kfdpbl$ke4$1@newscl01ah.mathworks.com> <kfdtfb$719$1@newscl01ah.mathworks.com> <kfe0cb$i20$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-06-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1360693565 23230 172.30.248.38 (12 Feb 2013 18:26:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 12 Feb 2013 18:26:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 4049612
Xref: news.mathworks.com comp.soft-sys.matlab:788864

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
   plot(dyds);hold on
return

same error message... The funny thing is that the code plots the vectors... but then shows the error message...

the problem is a profile described over a distance from 1 to 20 kms in this case...What am I doing wrong?