I'm implementing a polyfitting function to a curve. The Chart works beautifully on an example but if I compute the values wiht the polyfitting coefficients I get strange numbers.
The question is: Are the coefficients normalized?, do I have to apply a transformation? or anything.
An example using your basic fitting example and. Adding these points:
TChart1.Series(0).Add(2, 6, "")
TChart1.Series(0).Add(5, 4, "")
TChart1.Series(0).Add(3, 7, "")
TChart1.Series(0).Add(1, 9, "")
TChart1.Series(0).Add(1.6, 8, "")
TChart1.Series(0).Add(2.2, 5, "")
TChart1.Series(0).Add(3.2, 4, "")
TChart1.Series(0).Add(6, 4.5, "")
Using your example code and adjusting with polyFitting1.PolyDegree = 3
I get the following equation
y= +4.8117 -2.5595*x +0.3412*x^2
The chart data gives you the reading Y=5.057 for X=3. However, If you apply the above equation, you get Y= 0.204 for X=3
My question is Where is the trick?, How do you apply the coefficients and explain the difference?. Maybe you have some written documentation on the method used for fitting the curve and the meaning of the coeficients
Thank you
Meaning of polyfitting coeffs
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Re: Meaning of polyfitting coeffs
Yacu,
There's a thread discussing this issue which I strongly recommend you read here. I hope this is of some help!Yacu wrote: My question is Where is the trick?, How do you apply the coefficients and explain the difference?. Maybe you have some written documentation on the method used for fitting the curve and the meaning of the coeficients
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/