Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: distance between two points along a curve
Date: Sat, 8 May 2010 20:03:05 +0000 (UTC)
Organization: AAU
Lines: 31
Message-ID: <hs4g1p$5jm$1@fred.mathworks.com>
References: <hs3e0d$cht$1@fred.mathworks.com> <hs3f5t$qh4$1@fred.mathworks.com> <hs3g9h$7u4$1@fred.mathworks.com> <hs3hs7$ika$1@fred.mathworks.com> <hs3ikh$7g9$1@fred.mathworks.com> <hs3jtp$sso$1@fred.mathworks.com> <hs3lej$6jj$1@fred.mathworks.com> <hs42df$eo0$1@fred.mathworks.com> <hs4eog$dhh$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1273348985 5750 172.30.248.35 (8 May 2010 20:03:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 8 May 2010 20:03:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2345531
Xref: news.mathworks.com comp.soft-sys.matlab:633809

Dear Roger,
thanks a lot.
I tried to understand how that functions proposed by John work, but I was not successiful in applying them for my purposes ;-(
I would like to have just an example of the code to use, in order to understand how I can use those functions in my case.

For that reason I opted for the solution you proposed. BTW, I implemented it well?
It is correct?

It is for sure my fault if I have not understood fully how those functions work. I will look at them better now, and I hope to find a solution as soon as possible.

Any suggestion or code example is really appreciated ;-)

Luca

P.S. @John: I forgot to tell you "thanks" for the precious advice.



"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hs4eog$dhh$1@fred.mathworks.com>...
> "Luca Turchet" <tur@imi.aau.dk> wrote in message <hs42df$eo0$1@fred.mathworks.com>...
> > Hi all,
> > I think I got it.
> > .......
> 
>   I think you should follow John's excellent advice, Luca.  It sounds the best to me, since you have a curve y = f(x) with a known formula for its derivative, f'(x).  The differential equation you would be solving with 'ode45' is:
> 
>  dx/ds = 1/sqrt(1+f'(x).^2) .
> 
> You integrate with respect to arc length s as your independent variable, starting with x as the x-coordinate of point A at s = 0, and you stop when s has reached the distance you wish to travel along the curve to point B.  What could be simpler?
> 
> Roger Stafford