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: procedure Fill (value: double); { class TMatrix, and TMat3D }
procedure Fill (value: integer); { class TIntMatrix }

The method Fill sets all elements of a matrix to value. For a sparse matrix the method Fill sets only the non-zero elements to value. If value is zero the sparse matrix is completely emptied and any allocated memory is released.

Hint: The class TMatrix has no explicit method to clear the elements of the matrix. In order to reset all elements to zero values, the method Fill should be used.

Example: The statement Mat.Fill(0.0); clears all elements of the matrix Mat.

Example: This method is used in the following example program (see for downloading the code): covar, findcent, invmat

Last Update: 2017-Aug-14