You are here: Symbol Reference > Statistics Namespace > Functions > Statistics.MeanH Function
Stats Master VCL
ContentsIndex
Example

Calculate the harmonic mean for given values.

Uses MtxExpr, Statistics, Math387;
procedure Example;
var a: Vector;
  MH : double;
begin
  a.SetIt(false,[2,3,5,4]);
  MH := MeanH(a); // MH = 3.11688311688312
end;
#include "MtxExpr.hpp"
#include "Statistics.hpp"
void __fastcall Example()
{
  sVector a;
  a.SetIt(false, OPENARRAY(double,(2,3,5,4)));
  double MH = MeanH(a);
  // MH = 3.11688311688312
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.