Quartiles: Array;
The Quartiles property returns quartiles.
Sub Main;
Var
SQ: SmQPortions;
can,y: Array Of Double;
res, i: Integer;
m: Double;
Begin
can := New Double[16];
can[00] := 6209;
can[01] := 6385;
can[02] := 6752;
can[03] := 6837;
can[04] := 6495;
can[05] := 6907;
can[06] := 7349;
can[07] := 7213;
can[08] := 7061;
can[09] := 7180;
can[10] := 7132;
can[11] := 7137;
can[12] := 7473;
can[13] := 7722;
can[14] := 8088;
can[15] := 8516;
SQ := New SmQPortions.Create;
SQ.Samples := can;
res := SQ.Execute;
If res <> 0 Then
Debug.WriteLine(SQ.Errors);
Else
Debug.WriteLine("== Quartiles ==");
y := SQ.Quartiles;
For i := 0 To y.Length - 1 Do
m := y[i];
Debug.WriteLine(i.ToString + " " + m.ToString);
End For;
End If;
End Sub Main;
Executing this example shows quartiles in the console window:
Module execution started
== Quartiles ==
0 6209
1 6815.75
2 7134.5
3 7380
4 8516
Module execution finished
See also: