IStatistics.Rank

Syntax

Rank(Value: Double; Data: Array; AscendingOrder: Boolean): Integer;

Parameters

Value. The value rank of which is determined;

Data. Array of values;

AscendingOrder. Method of arrangement:

Description

The Rank method returns the rank of a number in a number array.

Comments

A number rank is the value of a number relative to other list values. After you have sorted a list, a number rank will show its item.

Example

Sub Main;

Var

st: Statistics;

d0: Double;

y: Array Of Double;

Begin

y := New Double[10];

y[00] := 2.8;

y[01] := 1.7;

y[02] := 2.3;

y[03] := 1.9;

y[04] := 2.1;

y[05] := 0.4;

y[06] := 2.2;

y[07] := 1.8;

y[08] := 2.4;

y[09] := 1.6;

st := New Statistics.Create;

d0 := st.Rank(2.2,y,True);

Debug.WriteLine("Rank: " + d0.ToString);

End Sub Main;

Executing this example shows the rank of the specified number in the console window:

Module execution started

Rank: 7

Module execution finished

See also:

IStatistics