Item(DimIndex: Integer): Integer;
DimIndex. Parameter number.
The Item property determines index of the matrix element for the specified coordinate parameter.
The number of coordinate parameters corresponds to the number of dimensions in the matrix.
Add a link to the MathFin system assembly.
Sub UserProc;
Var
M: Matrix[2];
Mm: IMatrixModel;
I, J: Integer;
Coord: IMatrixModelCoord;
Begin
Debug.WriteLine("Source matrix");
For i := 0 To 5 Do
For j := 0 To 5 Do
M[i, j] := Math.RandBetweenI(0, 9);
End For;
End For;
Mm := M As IMatrixModel;
Coord := Mm.CreateModelCoord;
Coord.Item(0) := Math.RandBetweenI(0, 5);
Coord.Item(1) := Math.RandBetweenI(0, 5);
Debug.WriteLine(Mm.Item(Coord));
End Sub UserProc;
After executing the example a matrix of random numbers is generated. The console displays the value of a matrix element with random coordinates.
See also: