Table of Contents

Name

histogramidx - find histogram index of a value in an array

Synopsis


int histogramidx (na, xa, x)int     na;double *xa;double  x;

Description

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.

Limitations

It is assumed that the the array is an ordered array, the first element being the lowest value.

Author

Peter Teuben

Update History


20-jun-89    created      PJT
27-jul-89    changed name from histid to histogramidx    PJT


Table of Contents