Polynomial AnswerVector Creates a Different Trend Line

TeeChart for ActiveX, COM and ASP
Post Reply
DaveB
Newbie
Newbie
Posts: 14
Joined: Thu May 08, 2003 4:00 am
Location: Rochester , NY
Contact:

Polynomial AnswerVector Creates a Different Trend Line

Post by DaveB » Tue Aug 10, 2004 1:59 pm

I have a sample VB6 project that demonstrates that the results ploted using the AnswerVector to recreate the polynomial function yields a different trend line than the one calculated by TeeChart 6 (latest version). I have also plotted the results from GetCurveYValue and this agrees with the TeeChart trend plot. If you would like me to upload or e-mail the project, I would be happy to do so, please provide me with the destination.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Aug 10, 2004 11:41 pm

Hi Dave,

yes please, send me it to pep@steema.com and we'll take a look.

DaveB
Newbie
Newbie
Posts: 14
Joined: Thu May 08, 2003 4:00 am
Location: Rochester , NY
Contact:

Post by DaveB » Thu Aug 12, 2004 9:29 pm

I have e-mail you the sample project.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Aug 13, 2004 2:51 pm

Hi Dave,

ok thanks. We'll take a look and will back to you with results as soon as possible.

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Aug 17, 2004 9:10 pm

Hello,

AnswerVector is the coefficient[s] less XValues.MinValue and YValues.MinValue.

There's a related to answer to this in a newsgroup correspondence (1999!)
http://groups.google.com/groups?q=teech ... com&rnum=1

The reason to subtract the MinValues is to reduce the possibility of an overflow caused by interim calculation values that go quite far off the scale.

Internally the GetCurveYValue function goes on to correctly calculate by adding the MinValues:
ie.
result:=CalcFitting(FPolyDegree,IAnswerVector,X-Source.XValues.MinValue)+IMinYValue;

Please let us know if that doesn't satisfactorily answer the question. I'll make a note for us to improve the related documentation.

Regards,
Marc Meumann
Steema Support

Post Reply