The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: TMatrix, TIntMatrix, TMat3D
Declaration: property Elem[ix,iy: longint]: double; { class TMatrix }
property Elem[ix,iy: longint]: integer; { class TIntMatrix }
property Elem[ix,iy,iz: longint]: integer; { class TMat3D }

The property Elem is used to access a specific element of a matrix. The parameters and specify the indices (column and row) of the element to be accessed (starting with an index of 1). The parameter iz specifies the index of the layer (for three dimensional matrices of type TMat3D). If any of the indices is invalid (the valid range is determined by the parameters of the constructor Create), Elem returns 0.0 (in case of a read operation), or the assignment is ignored (in case of a write operation).

Example: The statement Mat1.Elem[20,2]:=10.555; loads the matrix element of the 20th column and the second row with the value 10.555.

Example: This property is used in the following example programs (see for downloading the code): cluster, covar, findcent, interpol3d, invmat, multilinreg, ntabedit

Last Update: 2013-Oct-10