CopyVectorToMatrixRow

Declaration: CopyVectorToMatrixRow (SrcVec: TDoubleArray; FirstElem, LastELem, CellCol, CellRow: integer; var DstArr: TDouble2DArray): integer;
The function CopyVectorToMatrixRow copies the vector SrcVec into a row 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 row CellRow. 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