# FREQUENCY function

## Description

FREQUENCY(bins,range) returns a frequency table of the data in range as a matrix.

The argument bins must be a one-dimensional matrix.

The number of elements in the returned matrix is one more than the number of elements in bins matrix. The extra element in the returned matrix returns the count of any values above the highest value in the bins matrix.

## Example

FREQUENCY({4,6,8},2,4,5,5,6,6,8,9) returns {2,4,1,1}, because

- 2 values are less than or equal to 4.
- 4 values are more than 4 and less than or equal to 6
- 1 value is more than 6 and less than or equal to 8
- 1 value is more than 8

Note that the numbers in the bins matrix have to be sorted by magnitude, but the data do not have to be sorted.