Contents Previous Next Subchapters Current Chapters-> prctile ftail tpdf ttail ittail cnormal inormal rand snormal seed colmad colmse colrange colmode kurtosis skewness randperm ranseed unifm0v1 unirnd normrnd exprnd gamrnd cauchyrnd gumbelrnd laplacernd lognrnd wblrnd binornd poissrnd exppdf expcdf normpdf unifpdf unifcdf wblpdf wblcdf colcor colcov colmean colstd colmax rowmax colsum rowsum colnorm rownorm median colmedian colmead colvar corr conv conv2 sum cumsum prod cumprod Parent Chapters-> Omatrix6 statistics prctile Search Tools-> contents reference index search

Percentiles of Each Column
 Syntax `prctile(`X`, `p`)` See Also colrange , colmedian , colmean , sort

Description
Returns percentiles of the values in X. The value returned is a real or double-precision row vector with the same column dimension as X. The value p is a numeric scalar that specifies the percent value to calculate. ``` ```Example ```      X = {1., 2, 3, 4, 5}      X = X*X'      print "X == ", X      print "25th percentile == ", prctile(X, 25.0) ``` returns ```      X ==  {      [ 1 , 2 , 3 , 4 , 5 ]      [ 2 , 4 , 6 , 8 , 10 ]      [ 3 , 6 , 9 , 12 , 15 ]      [ 4 , 8 , 12 , 16 , 20 ]      [ 5 , 10 , 15 , 20 , 25 ]      }      25th percentile ==  [ 2 , 4 , 6 , 8 , 10 ]  ``` Continue the example by entering ```      prctile(X, 75) ``` returns ```      [ 4 , 8 , 12 , 16 , 20 ] ```