\function{hist1d} \synopsis{Compute a 1-d histogram} \usage{h = hist1d ([h,] pnts, grid [, &rev])} \description The \ifun{hist1d} function bins a set of points \exmp{pnts} into a 1-d histogram using bin-edges given by the grid argument. The optional last argument \exmp{&rev} is a reference to a variable whose value will be assigned the reverse-indices of the histogram. The first argument \exmp{h} is optional. If present and non-NULL, it will be used as the histogram buffer with new binned values added to it. That is, the following statements are equivalent: #v+ h = h + hist1d (pnts, grid); h = hist1d (h, pnts, grid); #v- The value of the ith bin in the histogram is given by the number of values in the \exmp{pnts} array that satisfy \exmp{grid[i]<=X