Dew Stats Master .NET
MeanH Routine
Summary
Harmonic mean.

Unit
Statistics

Declaration
Function MeanH(Data: TVec): TSample;
 Parameter  Description 
Data Data. An exception is raised if Data is complex. 
Result
the harmonic mean of given values.
Categories
Descriptive statistics routines
 See Also 
MeanG 
MeanT 

Example 1

Calculate the harmonic mean for given values.

Uses MtxExpr, Statistics, Math387; procedure Example; var a: Vector; MH : TSample; begin a.SetIt(false,[2,3,5,4]); MH := MeanH(a); // MH = 3.11688311688312 end;
#include "MtxVecCpp.h" #include "Statistics.hpp" void __fastcall Example(); { Vector a; a->SetIt(false, OPENARRAY(double,(2,3,5,4))); double MH = MeanH(a); // MH = 3.11688311688312 }
using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector a = new Vector(0), a.SetIt(false, new double[] {2,3,5,4}); double MH = Statistics.MeanH(a); // MH = 3.11688311688312 } }


Copyright 2008 Dew Research
http://www.dewresearch.com