Table of Contents
histogramidx - find histogram index of a value in an array
int histogramidx (na, xa, x)
int na;
double *xa;
double x;
histogramidx returns the histogram index idx of a value x in
an array xa with na entries (xa[0]..xa[na-1]), such that xa[idx] < x < xa[idx+1].
Hence idx is in the range 0..na-2.
histogramidx returns -1 when x is outside
the two extremes.
It is assumed that the the array is an ordered
array, the first element being the lowest value.
Peter Teuben
20-jun-89 created PJT
27-jul-89 changed name from histid to histogramidx PJT
Table of Contents