|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home MathPack Matrix Class TMat4D Methods Percentile|
|See also: QuickSelect, MeanVar|
The function Percentile returns the percentile with the probability of prob percent. The calculation of the percentile is based on QuickSelect and includes all matrix elements between (and including) LowCol, LowRow, HighCol, HighRow, LowLayer, HighLayer, LowTimeSlot, and HighTimeSlot. The function returns a zero value if any error occurs.
Version  of the function performs an exact calculation, version  calculates the percentile of a random sample taken from the specified data range. The size of the random sample is controlled by the parameter SampleSize. If SampleSize is zero, version  is automatically executed. If SampleSize is larger than the number of elements in the specified data range, oversampling occurs (which does no harm to the result but is slower than version ). The big advantage of version  is that it is much faster than version  if the specified data range is large. Typically, version  should be used if the number of specified elements exceeds 50000 cells, using a sample size of 10000.
Please note that the 50%-percentile (prob = 50) is also known as the median of the distribution.