Declaration: CopyVectorToMatrixColumn (SrcVec: TDoubleArray; FirstElem, LastELem, CellCol, CellRow: integer; var DstArr: TDouble2DArray): integer;
The function CopyVectorToMatrixColumn copies the vector SrcVec into a column of the target matrix DstArr. The range of the copied cells is controlled by the parameters FirstElem and LastElem. Set FirstElem and LastElem to zero in order to copy the entire source vector. The first cell of the target matrix to be filled is specified by the parameters CellCol and CollRow. All other elements of the vector are copied into consecutive cells of column CellCol. Please note that all parameters are zero-based array indices.

The function returns the following error codes:

 0 ... everything is OK
-1 ... FirstElem and/or LastElem are outside the source vector
-2 ... CollCol and/or CellRow are outside of destination matrix

Last Update: 2018-Sep-16