next up previous contents index
Next: 2D Histograms Up: Module HiStats Previous: Module HiStats   Contents   Index


1D Histograms

For 1D histograms, various numerical methods are provided such as computing means and sigmas, finding maxima, fitting, rebinning, integrating ...
The example below shows creating and filling a one dimensional histogram of 100 bins from $-5.$ to $+5.$ to create a Gaussian normal distribution with errors :

#include "histos.h"
// ...
Histo H(-0.5,0.5,100);
H.Errors();
for(int i=0;i<25000;i++) {
  double x = NorRand();
  H.Add(x);
}
H.Print(80);



Reza Ansari
2001-03-07