IStatistics.Large

Syntax

Large(Data: Array; Position: Integer): Double;

Parameters

Data is an array of data for which the k-th greatest value is calculated. Array value must be greater than zero (0);

Position is a position (starting from the greatest one) in a data array. Use the values from the range (0; the Data length].

Description

The Large method returns the k-th greatest value from a data set. This function enables the user to select a value by its relative position.

Example

Sub Main;

Var

st: Statistics;

d0: Double;

y: Array Of Double;

Begin

y := New Double[7];

y[00] := 6;

y[01] := 7;

y[02] := 9;

y[03] := 15;

y[04] := 21;

y[05] := 24;

y[06] := 25;

st := New Statistics.Create;

d0 := st.Large(y,3);

Debug.WriteLine("Third largest number: " + d0.ToString);

d0 := st.Large(y,6);

Debug.WriteLine("Sixth greatest number: " + d0.ToString);

End Sub Main;

Executing this example shows the results in the console window:

Module execution started

Third greatest number: 21

Sixth largest number: 7

Module execution finished

See also:

IStatistics