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....



PercentileArray


Unit:SDL_openarrays
Class: none
Declaration: [1] function PercentileArray (prob: double; Arr: TDoubleArray): double;
[2] function PercentileArray (prob: double; Arr: TDoubleArray; First, Last: integer): double;
[3] function PercentileArray (prob: double; Arr: TDouble2DArray; FirstCol, FirstRow, LastCol, LastRow: integer): double;
[4] function PercentileArray (prob: double; Arr: TIntArray): double;

The function PercentileArray returns the percentile of the distribution of all values of the array Arr. The parameter prob specifies the probability in percent (valid range: 0..100). If prob is set to a value outside the valid range it is automatically restricted to the closest boundary of the valid range. Versions [1], [2] and [4] analyze a one-dimensional array, version [3] a two-dimensional array.

In the case of version [2] the parameters First and Last specify the first and last element of the array to be processed. In the case of version [3] the parameters FirstCol, FirstRow, LastCol, LastRow define the range of the array to be analyzed. If any of these parameter is out of range, it is automatically adjusted to the closest valid limit.

Hint: The calculated percentile is not interpolated and simply returns the closest value of the distribution, which may differ from results obtained from statistical packages if the number of included values is low.



Last Update: 2023-Feb-06