Skip to content

percentile_inc

K-th percentile (inclusive of 0% and 100%).

v = percentile_inc(array, k)

Returns the value at the k-th percentile of array, where k is in [0, 1]. 0 returns the minimum, 1 the maximum, 0.5 the median. Uses linear interpolation between adjacent ranks.

percentile_inc([1 2 3 4 5 6 7 8 9 10], 0.9) % 9.1