Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Quadratic curve fitting!

Reply
Thread Tools

Quadratic curve fitting!

 
 
Vinodh Kumar
Guest
Posts: n/a
 
      08-11-2003
Number One:
=========
I know its a 100% offline post.But seeing the diversity of the domain from
which people are participating,
I would like to post this question here.Pardon me.At the least, u can guide
me to the proper newsgroup.Thanks.

Number Two:
=========
I want to draw a curve for a set of observations(i.e, x,y pairs) using
Quadratic fit using Least Square method.
I do not what is the step1, step2, step 3 i mean alogorithm for this
process.Any helps will be gratefully appreciated.

Regards,
Vinodh Kumar P




 
Reply With Quote
 
 
 
 
David White
Guest
Posts: n/a
 
      08-11-2003
"Vinodh Kumar" <(E-Mail Removed)> wrote in message
news:bh7vnv$l4p$(E-Mail Removed)...
> Number One:
> =========
> I know its a 100% offline post.


So, you don't even have an excuse.

> But seeing the diversity of the domain from
> which people are participating,
> I would like to post this question here.Pardon me.At the least, u can

guide
> me to the proper newsgroup.Thanks.


I wouldn't have a clue. Did you try looking for a group with 'algorithm',
'math' or related term, or did you just decide to ask a completely off-topic
question as your first step?

> Number Two:
> =========
> I want to draw a curve for a set of observations(i.e, x,y pairs) using
> Quadratic fit using Least Square method.
> I do not what is the step1, step2, step 3 i mean alogorithm for this
> process.Any helps will be gratefully appreciated.


Completely off-topic, which you already know. So why bother asking?

DW



 
Reply With Quote
 
 
 
 
Peter van Merkerk
Guest
Posts: n/a
 
      08-11-2003
"Vinodh Kumar" <(E-Mail Removed)> wrote in message
news:bh7vnv$l4p$(E-Mail Removed)...
> Number One:
> =========
> I know its a 100% offline post.But seeing the diversity of the domain

from
> which people are participating,
> I would like to post this question here.Pardon me.At the least, u can

guide
> me to the proper newsgroup.Thanks.
>
> Number Two:
> =========
> I want to draw a curve for a set of observations(i.e, x,y pairs) using
> Quadratic fit using Least Square method.
> I do not what is the step1, step2, step 3 i mean alogorithm for this
> process.Any helps will be gratefully appreciated.


You are most likely to get a good and peer reviewed answers if you post
the question to a newsgroup where your question is topical. In this case
that would be comp.graphics.algorithms

--
Peter van Merkerk
peter.van.merkerk(at)dse.nl



 
Reply With Quote
 
Marc Durufle
Guest
Posts: n/a
 
      08-11-2003
Vinodh Kumar wrote:
>
> Number One:
> =========
> I know its a 100% offline post.But seeing the diversity of the domain from
> which people are participating,
> I would like to post this question here.Pardon me.At the least, u can guide
> me to the proper newsgroup.Thanks.
>
> Number Two:
> =========
> I want to draw a curve for a set of observations(i.e, x,y pairs) using
> Quadratic fit using Least Square method.
> I do not what is the step1, step2, step 3 i mean alogorithm for this
> process.Any helps will be gratefully appreciated.
>
> Regards,
> Vinodh Kumar P



Well, i don't know what are your real aims. We use least square method
to fit with a model curve.
By example, you can by this method find the straight line who is the
nearest from a set of points.
It is very used in physics when you want to find numerically the
parameters of a linear law. You
can also use least square method to find the nearest parabole, cubic
... curve, which is the nearest from your points.
You compute by this way the coefficients a,b,c so that y=a x + b x +c
is the nearest
parabol from your points.
Then you have to minimize the functionnal J = Sum_i( (y_i - a*x_i+
b*x_i +c)^2) where (x_i,y_i) is the set of points

If your aim is to smooth a set of edges, you can use smooth techniques
like splines. Especially cubic splines are very nice.
You ensure by using cubic splines that your curve will pass by your sets
of points, and the curve is smooth. I joined a documentation
about splines

http://kr.cs.ait.ac.th/~radok/math/mat7/step28.htm

http://math.arizona.edu/~restrepo/47...ea/node35.html

--
Marc Durufle
Inria Rocquencourt
Tel : 01 39 63 56 27
--------------------------
 
Reply With Quote
 
Samuele Armondi
Guest
Posts: n/a
 
      08-11-2003
"Vinodh Kumar" <(E-Mail Removed)> wrote in message
news:bh7vnv$l4p$(E-Mail Removed)...
> Number One:
> =========
> I know its a 100% offline post.But seeing the diversity of the domain from
> which people are participating,
> I would like to post this question here.Pardon me.At the least, u can

guide
> me to the proper newsgroup.Thanks.
>
> Number Two:
> =========
> I want to draw a curve for a set of observations(i.e, x,y pairs) using
> Quadratic fit using Least Square method.
> I do not what is the step1, step2, step 3 i mean alogorithm for this
> process.Any helps will be gratefully appreciated.
>
> Regards,
> Vinodh Kumar P
>

It is very OT in here... but I would suggest using Newton's interpolation
formula to work out the polynomial. Look Newton interpolation formula up in
google and it should give you enough information. If you need anymore help,
email me and I will do my best.
HTH,
S. Armondi


 
Reply With Quote
 
Marc Durufle
Guest
Posts: n/a
 
      08-11-2003

> >

> It is very OT in here... but I would suggest using Newton's interpolation
> formula to work out the polynomial. Look Newton interpolation formula up in
> google and it should give you enough information. If you need anymore help,
> email me and I will do my best.
> HTH,
> S. Armondi


I hope you won't have lots of points because classical Lagrangian
interpolation (we call also Newton) gives a poor approximation
when the degree of polynoms increase. You get oscillations and it is why
we prefer to use cubic splines You can also use lagrangian
polynomials on subsets of 3 or 4 points, but you will have
discontinuities in your curve. Anyway, it works...


--
Marc Durufle
Inria Rocquencourt
Tel : 01 39 63 56 27
--------------------------
 
Reply With Quote
 
onetimeuser onetimeuser is offline
Junior Member
Join Date: Dec 2010
Posts: 1
 
      12-01-2010
I have the same problem and google directed me here. I think that interpolation is not a solution.

Interpolation fits the curve to go through all samples
LMS quadratic fitting, finds a 2nd degree function such thatthere is a minimal error between samples and curve. (function do not pass through samples)

All in all - my post is usless because it gives no answer :/

Try google code search. I have just found:
[www] dot google.com/codesearch/p?hl=pl#R_csOllczbk/ccstruct/lmedsq.cpp&q=quadratic%20fit%20lms&sa=N&cd=1&ct=rc
(sory, i can not post links)

In line 112 there is a LMS line fit function. I am just about to analize it
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
curve and curve with error objects : sorting , friend Hicham Mouline C++ 2 09-14-2009 02:11 PM
Quadratic Optimization Problem amitsoni.1984@gmail.com Python 3 11-22-2006 10:45 PM
Multiple Polynomial Quadratic Sieve Philip Smith Python 2 05-30-2006 10:29 PM
Quadratic Solutions in C++ Sunny Computer Support 12 02-26-2006 11:14 AM
Quadratic Formula Woes fb C Programming 6 09-01-2004 08:38 AM



Advertisments