You are here: Symbol Reference > Dew.Stats Namespace > Statistics Class > Statistics Methods > CumulativeHist Method > CumulativeHist Method (TVec, Integer, TVec, TVec, boolean)
Dew Stats for .NET
Contents
C# Example

Equal bins -> faster algorithm.

using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
  private void Example()
  {
    Vector Data  = new Vector(1000,false);
    Vector Bins = new Vecttor(0);
    Vector CumRelFreq = new Vector(0);
    // generate some normally distributed data
    StatRandom.RandomNormal(-3.0, 0.2, Data);
    Statistics.CumulativeHist(Data,15,CumRelFreq,Bins);
    // Bins holds the 15 intervals centerpoints
    // and CumRelFreq holds the relative cumulative count of
    // elements in each bin.
  }
}
Copyright (c) 1999-2010 by Dew Research. All rights reserved.