|
|
|
|
- Calculating the geometric mean for a series of values
Calculating the geometric mean for a series of values The following code is used to calculate the geometric mean ( statGeometric constant) of the elements in row 3. We assume that the matrix is already created and initialized. // -- Click code on BTN_GeoMean // Declare the variables ResMean is real // Geometric mean of elements in row 3 ResMean = StatAverage("MyMatrix", statGeometric, 3, False) // Error on StatAverage? IF StatError() = 0 THEN // Display the result Info("The geometric mean is: " + ResMean) ELSE // Display the error message Error(ErrorInfo(errMessage)) END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|