Comparison

Comparison

Compares a value to a number of limits.

Inputs

value
The value to compare against limits.
limits
A set of limits in ascending order.

Outputs

index
The zero-based index of the smallest limit that is greater than or equal to value. If value is not less than the last limit, index will be equal to the number of limits. For example, if limits is [ 0, 10 ], anything less than or equal to 0 as value gives 0, anything greater than 0 but less than 10 gives 1 and values from 10 up give 2. If limits is empty or has more than one column, index will be -1.