Solo para dar las gracias sobre la existencia de la funcion de calculo de desviacion estandar. Tambien dentro de la unidad Mat (delphi 7) existe la funcion MeanAndStdDev.
De la ayuda de Delphi7
Cita:
Calculates the mean and standard deviation of array elements.
Unit
Math
Category
Statistical routines
Delphi syntax:
procedure MeanAndStdDev(const Data: array of Double; var Mean, StdDev: Extended);
C++ syntax:
extern PACKAGE void __fastcall MeanAndStdDev(const double * Data, const int Data_Size, Extended &Mean, Extended &StdDev);
Description
MeanAndStdDev calculates Mean and standard deviation in one pass. Using this is twice as fast as calculating them separately. Precision may be lost when the Mean is very large (> 10e7) or the variance is very small.
Data specifies the data to be summarized. In C++, Data_Size is the index of the last element in the Data array (one less than the number of elements). The mean is returned as Mean and the standard deviation is returned as StdDev.
Note: If the sample size is 1 (that is, if Data contains only one entry), StdDev returns the value of Data[0] and not zero.
|
¡Me ahorro mucho trabajo! ¡¡Aun hay mucho que encontrar en Delphi!!