Navigation

Operators and Keywords

Function List:

C++ API

: q = prctile (x)
: q = prctile (x, p)
: q = prctile (x, p, dim)

For a sample x, compute the quantiles, q, corresponding to the cumulative probability values, p, in percent.

If x is a matrix, compute the percentiles for each column and return them in a matrix, such that the i-th row of y contains the p(i)th percentiles of each column of x.

If p is unspecified, return the quantiles for [0 25 50 75 100].

The optional argument dim determines the dimension along which the percentiles are calculated. If dim is omitted it defaults to the first non-singleton dimension.

Programming Note: All non-numeric values (NaNs) of x are ignored.

See also: quantile.

Package: octave