Calculating Average, Standard Deviation and max and min

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Friis
Newbie
Newbie
Posts: 11
Joined: Mon Apr 11, 2011 12:00 am

Calculating Average, Standard Deviation and max and min

Post by Friis » Wed Jun 15, 2011 1:14 pm

Hi,

How do I calculate:

Average
Standard Deviation
Max
Min

from a serie ?

If I "zoom" on a part of the serie - how do I then calculate the average, standard deviation and max and min of only the part that has been zoomed ?

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

Re: Calculating Average, Standard Deviation and max and min

Post by Narcís » Thu Jun 16, 2011 8:29 am

Hi Friis,
How do I calculate:

Average
Standard Deviation
Max
Min

from a serie ?
You can use TeeChart built-in functions for that. You'll find examples of all of them at All Features\Welcome!\Functions\ in the new features demo, available at TeeChart's program group.
If I "zoom" on a part of the serie - how do I then calculate the average, standard deviation and max and min of only the part that has been zoomed ?
For minimum and maximum you could do something as the local minimum and maximum example suggested here. You could use series' FirstVisibleIndex and LastVisibleIndex as first and last arguments. This is a TeeChart .NET thread but same should apply to VCL version.

For average and standard deviation you could use its Calculate method passing visible indexes as in the local minimum and maximum example.
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