Curvefitting (howto)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Carsten
Newbie
Newbie
Posts: 12
Joined: Fri Sep 30, 2005 4:00 am

Curvefitting (howto)

Post by Carsten » Fri Sep 15, 2006 12:17 pm

Hi

I have a set of data that is plotted in the graph SOURCE as a Line graph. In the same chart I can easily choose to make a curve fitted plot as well. But how can I calculate/get an Y-value from an arbitrary X-value. I could not find any examples that worked in C++. Maybe more explanation on the curve fitting function and how it works would also be appreciated.

Best regards
Carsten Hinrichsen

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Sep 15, 2006 2:03 pm

Hi Carsten,

To obtain values from any point in a series you can do something as in the interpolating example I posted in this other thread.

CurveFitting function help info:

TCurveFittingFunction constructs a polynomial line based on its DataSource Series values.

The algorithm used to fit the points is a Gaussian Polynomial.

Use the PolyDegree property to determine the number of polynomial coefficients.

To see a visual representation of TeeChart Extended Functions, go to the TeeChart User Guide.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Carsten
Newbie
Newbie
Posts: 12
Joined: Fri Sep 30, 2005 4:00 am

Post by Carsten » Mon Sep 18, 2006 12:50 pm

Hi

I could not find any help that gives an answer to my question. Do you have a pice of C++ code?

Regards
Carsten

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Sep 18, 2006 1:46 pm

Hi Carsten,

Have you tried porting the interpolating example to C++? If so, which are the problems you found?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply