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



ResizeAndClear


Unit: SDL_matrix
Class: TMatrix, TIntMatrix, TMat3D
Declaration: function ResizeAndClear (Nc, Nr: longint): boolean;{ class TMatrix and TIntMatrix }
function ResizeAndClear (Nc, Nr, Nl: longint): boolean;{ class TMat3D }

The method ResizeAndClear can be used to adjust the dimensions of the matrix and reset its cells to zero values. The parameters Nc and Nr define the intended size of the matrix (number of columns and number of rows). For TMat3D the parameter Nl determines the number of layers. ResizeAndClear returns a TRUE value if the new matrix has been resized successfully.

Hint 1: Resizing a matrix allocates additional auxiliary memory. If the matrix size is rather large, you are better off if you free the old matrix and create the new matrix from scratch.

Hint 2: In the Light Edition the number of cells is restricted to 2000 (NrOfColumns times NrOfRows times NrOfLayers).



Last Update: 2015-May-13