Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: (yet unsolved) how to Solve coupled ODEs
Date: Wed, 13 Feb 2013 08:01:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <kffh85$2p0$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> <kfe1ft$mlu$1@newscl01ah.mathworks.com> <kfe78p$f5b$1@newscl01ah.mathworks.com> <kfeavo$2f$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1360742469 2848 172.30.248.46 (13 Feb 2013 08:01:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 13 Feb 2013 08:01:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3799640
Xref: news.mathworks.com comp.soft-sys.matlab:788919

"Henry" wrote in message <kfeavo$2f$1@newscl01ah.mathworks.com>...
> I modified the code to:
> 
> tspan = linspace(1, 2,100);
> y = 0.0001*ones(1,200);
> [T,sols] = ode45(@yprime, tspan,y);
> and
> dyds = [dyds1' ; dyds2']; 
> 
> and it now runs, thanks. 
> 
> But I have this question: My odes are time-independent, function of "s" which is a distance, but since the ode45 will not work without a tspan, I came up with an arbitrary tspan. It looks as if ode45 interprets that "s" is a time? I'm confused as to how interpret the result of the routine which has dimensions of 100x200. I was expecting 1 x 200, i.e. independent of time. 
> thanks

Just interpret your results for y(1) and y(2) as functions of distance, not of time.
So "tspan" in your case is a distance vector, not a time vector.

Best wishes
Torsten.