Statistics Toolbox    
prctile

Percentiles of a sample

Syntax

Description

Y = prctile(X,p) calculates a value that is greater than p percent of the values in X. The values of p must lie in the interval [0 100].

For vectors, prctile(X,p) is the pth percentile of the elements in X. For instance, if p = 50 then Y is the median of X.

For matrix X and scalar p, prctile(X,p) is a row vector containing the pth percentile of each column. If p is a vector, the ith row of Y is p(i) of X.

Examples


  polyval princomp