Percentiles of a data set

returns
percentiles of the values in a data vector or matrix `Y`

= prctile(`X`

,`p`

)`X`

for
the percentages `p`

in the interval [0,100].

If

`X`

is a vector, then`Y`

is a scalar or a vector with the same length as the number of percentiles required (`length(p)`

).`Y(i)`

contains the`p(i)`

percentile.If

`X`

is a matrix, then`Y`

is a row vector or a matrix, where the number of rows of`Y`

is equal to the number of percentiles required (`length(p)`

). The`i`

th row of`Y`

contains the`p(i)`

percentiles of each column of`X`

.For multidimensional arrays,

`prctile`

operates along the first nonsingleton dimension of`X`

.

[1] Langford, E. "Quartiles in Elementary Statistics", *Journal
of Statistics Education*. Vol. 14, No. 3, 2006.

Was this topic helpful?