Geometric mean.
function MeanG(const Data: TVec): double;
Parameters |
Description |
Data |
Data. An exception is raised if Data is complex. |
the geometric mean of given values.
Calculate the geometric mean for given values.
Uses MtxExpr, Statistics, Math387; procedure Example; var a: Vector; MG : double; begin a.SetIt(false,[2,0.1,3,4]); MG := MeanG(a); // MG = 1.24466595457696 end;
#include "MtxExpr.hpp" #include "Statistics.hpp" void __fastcall Example() { sVector a; a.SetIt(false, OPENARRAY(double,(2,0.1,3,4))); double MG = MeanG(a); // MG = 1.24466595457696 }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|