Add;
The Add method adds a data series to collection.
Sub Main;
Var
LinearR: SmLinearRegress;
fact: Array Of Double;
Series: ISlSeries;
i: Integer;
Begin
LinearR := New SmLinearRegress.Create;
Fact := New Double[5];
For i := 0 To 4 Do
Fact[i] := 1230 + i;
End For;
Series := LinearR.Explanatories;
Series.Add.Value := fact;
Series.Add.Value := fact;
For i := 0 To Series.Count - 1 Do
Series.Item(i).Name := "factor " + i.ToString;
Debug.WriteLine(Series.Item(i).Name);
End For;
End Sub Main;
Executing this example creates two explanatory series names of which are to be displayed in the console window:
Module execution started
factor 0
factor 1
Module execution finished
See also: