The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Big Problem with Polynomial Curve Fitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

VolkerPresser

Germany
Posts

Posted - 10/10/2006 :  10:51:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: WinXP

Hello,

I do have the following problem: When fitting a polynomial function (2. order; type: A0 + A1*x + A2*x^2 = y) I get a very good fit (R 0.99887). However I CANNOT recalcuate the values obtained from non linear curve fitting, i.e. when calculating with the refined parameters the outcome is different to those provided in the NLSF sheet (and more than differing from those values as seen in the diagram).

example:

650 = x --> y (NLSF) = -17 / Y (calculated) = -14 !!

Funny... Excel comes up the the very same result for a polynomial function - but the outcome is also wrong when recalculating it! I honestly do have not a hint of a clue what went wrong....

Does someone has any idea about this problem? It's really creeping me out...

Thanks in advance :)

Volker

P.S. my data points are:

650 -17
700 -15.7
750 -14.5
800 -13.48
850 -12.5

Mike Buess

USA
3037 Posts

Posted - 10/10/2006 :  5:43:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Volker,

It's probably just a matter of precision. When I fit your data to the Poly function the results log and parameter worksheet tell me that a2 = -0.00002, but if I ask for a2 in the script window I get A2 = -2.342857E-5. A small difference in a high order coefficient can make a large difference when you try to reproduce the fit curve so you should use the nlsf parameter expressions (nlsf.p1, nlsf.p2, nlsf.p3 or a0, a1, a2) rather than copying/pasting from results log or worksheet. If your data are in cols A(X) and B(Y) then create col C(Y) and enter the following expression in the script window.

col(C) = a0 + a1*col(A) + a2*col(A)^2

If you've started another fit or closed and reopened the project then a0, a1 and a2 will have the wrong values. In that case you can redefine them from the parameter worksheet...

a0 = Parameters1_Value[1];
a1 = Parameters1_Value[2];
a2 = Parameters1_Value[3];

Although the worksheet cells are displayed with reduced precision their internal data are full precision.

For more discussion on this issue see this forum topic:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=3663

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000