Thread Subject: spline curve length

Subject: spline curve length

From: Didi Cvet

Date: 11 Aug, 2009 09:52:05

Message: 1 of 5

Hi

I want to estimate the length of a spline curve, I want to put this length in fmincon rutine as an object function. This is how I try
%%%%
C=spmak(knot, d');
fnplt(C)
Cprim=fnder(C);

ff=fnval(Cprim, param);
norma=((ff(1,:)).^2+ff(2,:).^2);
length=trapz(norma);
%%%%

but I'm not shure that this is it, because I get very big result. Is there any function in MATLAB whit which I can get spline curve length?

Thanks

Subject: spline curve length

From: Bruno Luong

Date: 11 Aug, 2009 10:05:04

Message: 2 of 5

"Didi Cvet" <didi_cvet@yahoo.com> wrote in message <h5rf05$nce$1@fred.mathworks.com>...
> Hi
>
> I want to estimate the length of a spline curve, I want to put this length in fmincon rutine as an object function. This is how I try
> %%%%
> C=spmak(knot, d');
> fnplt(C)
> Cprim=fnder(C);
>
> ff=fnval(Cprim, param);
> norma=((ff(1,:)).^2+ff(2,:).^2);
> length=trapz(norma);
> %%%%
>

I can't check your code carefully, but missing a square-root is what I have noticed.

Bruno

Subject: spline curve length

From: Didi Cvet

Date: 11 Aug, 2009 11:58:03

Message: 3 of 5

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h5rfog$btl$1@fred.mathworks.com>...
> "Didi Cvet" <didi_cvet@yahoo.com> wrote in message <h5rf05$nce$1@fred.mathworks.com>...
> > Hi
> >
> > I want to estimate the length of a spline curve, I want to put this length in fmincon rutine as an object function. This is how I try
> > %%%%
> > C=spmak(knot, d');
> > fnplt(C)
> > Cprim=fnder(C);
> >
> > ff=fnval(Cprim, param);
> > norma=((ff(1,:)).^2+ff(2,:).^2);
> > length=trapz(norma);
> > %%%%
> >
>
> I can't check your code carefully, but missing a square-root is what I have noticed.
>
> Bruno


I dont have square-root because my object function works with squared norm, however this doesn't solve my problem

Thanks anyway
Regards

  

Subject: spline curve length

From: Bruno Luong

Date: 11 Aug, 2009 12:22:04

Message: 4 of 5

"Didi Cvet" <didi_cvet@yahoo.com> wrote in message <h5rmcb$g64$1@fred.mathworks.com>...
>
> I dont have square-root because my object function works with squared norm, however this doesn't solve my problem
>

Then you are *not* interested in the *length* contrary to the subject line of the thread. Distance is integral of speed, not the square of speed.

Bruno

Subject: spline curve length

From: Didi Cvet

Date: 11 Aug, 2009 14:57:04

Message: 5 of 5

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h5rnpc$ht6$1@fred.mathworks.com>...
> "Didi Cvet" <didi_cvet@yahoo.com> wrote in message <h5rmcb$g64$1@fred.mathworks.com>...
> >
> > I dont have square-root because my object function works with squared norm, however this doesn't solve my problem
> >
>
> Then you are *not* interested in the *length* contrary to the subject line of the thread. Distance is integral of speed, not the square of speed.
>
> Bruno

I guess you are right, my problem is not in my object function then in the way I use fmincon because after this routine is called I get big estimate for the length (with sqrt in the formula), but that's another subject.

Sorry for badger and thank you for you time!

Greeting

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
trapz Sprinceana 20 Sep, 2009 09:32:05
curve length Sprinceana 20 Sep, 2009 09:31:55
spline toolbox Sprinceana 20 Sep, 2009 09:31:55
curve Sprinceana 20 Sep, 2009 09:31:55
spline Sprinceana 20 Sep, 2009 09:31:55
rssFeed for this Thread

Contact us at files@mathworks.com