Table of Contents

Name

histid - find histogram index of a value in an array

Synopsis


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

Description

histid returns the histogram index of a value x in an array xa with na entries (xa[0]..xa[na-1]), such that xa[histid] < x < xa[histid+1]. Hence histid is in the range 0..na-2.

histid 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


Table of Contents