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



CopyColToVec


Unit:SDL_matrix
Class: TMatrix, TIntMatrix
Declaration: procedure CopyColToVec (DestVec: TVector; Col, FirstRow, LastRow: integer); { class TMatrix }
procedure CopyColToVec (DestVec: TIntVector; Col, FirstRow, LastRow: integer); { class TIntMatrix }

The method CopyColToVec copies part of a column of the matrix into the vector DestVec. 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 vector. The matrix element with address [Col FirstRow ] is copied to the first element of the vector, the element [Col FirstRow+1 ] is copied to the second vector element, and so on, until the cell at [Col LastRow ] has been copied.

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

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

Example: This method is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): interpol3d



Last Update: 2012-Oct-20