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.
|