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....



Elem


Unit: SDL_matrix
Class: TMat4D
Declaration: property Elem[ix,iy,iz,it: longint]: integer;

The property Elem is used to access a specific element of a matrix. The parameters ix, iy, iz, and it specify the indices (columns, rows, layers, time slots) of the element to be accessed (starting with an index of 1). If any of the indices is invalid, Elem returns 0.0 (in case of a read operation), or the assignment is ignored (in case of a write operation).

Hint: Please note that the property Elem is the default property of the class TMat4D. Thus the matrix elements can be accessed by omitting the property name "Elem" (i.e. Mat[12,23,4,7] instead of Mat.Elem[12,23,4,7])

Example: The statement Mat1.Elem[20,2,1,5]:=10.555; loads the matrix element of the 20th column, the second row, the first layer and the fifth time slot with the value 10.555.


Last Update: 2013-Feb-18