AddArray(ArrayValue: Array): ITimeSeries;
ArrayValue. Values of array elements.
The AddArray method adds an array to matrix.
To add a series to matrix, use the IMsTimeMatrix.AddSerie method.
This example describes custom method.
To execute the example, add links to the Ms system assemblies.
Public Function Create(param: IMsTimeMatrix): Variant;
Var
m : IMsTimeMatrix;
arr: Array[3] Of Double;
i, j: Integer;
s : String;
serie : ITimeSeries;
Begin
m := New MsTimeMatrix.Create;
arr[0] := 0.10;
arr[1] := 0.20;
arr[2] := 0.30;
m.AddArray(arr);
Debug.WriteLine("Series: " + m.Count.ToString);
For i := 0 To m.Count - 1 Do
s := "";
serie := m.Item(i);
For j := m.StartIndex To m.EndIndex Do
s := s + (serie.Item(j) As double).ToString + " ";
End For;
Debug.WriteLine("Series: " + i.ToString + " - " + s);
End For;
Return m;
End Function Create;
The method adds an array to matrix. After that the console window displays resulting matrix series.
See also: