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



CopyColTo1DArray


Unit:SDL_matrix
Class: TMatrix, TIntMatrix
Declaration: [1] procedure CopyColTo1DArray (Dest: TDoubleArray; Col, FirstRow, LastRow, DestElem: integer); { class TMatrix }
[2] procedure CopyColTo1DArray (Dest: TIntArray; Col, FirstRow, LastRow, DestElem: integer); { class TIntMatrix }

The method CopyColTo1DArray copies part of a column of the matrix into the one-dimensional array Dest. The parameter Col specifies the column to be copied, the parameters FirstRow, and LastRow define the range of the column to be copied to the array. If FirstRow or LastRow is out of range the parameter is automatically adjusted to the nearest valid value (either 1 or NrOfRows).

The parameter DestElem is the first cell of the destination array. All values are copied to this cell and the subsequent ones. DestElem can be negative as well (valid range: -(LastRow-FirstRow) ... length(Dest)-1).

If the destination array is larger than the specified range, the remaining cells are set to zero values. If the array is smaller, only the first n elements (n = size of the array) are copied.

Hint: Setting both FirstRow and LastRow to zero values forces the method to use all rows.



Last Update: 2023-Feb-06