DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


Declaration: MatrixCopy (InMat: TDouble2DArray; var TargetMat: TDouble2DArray): integer;
Copies the contents of the matrix InMat to the matrix TargetMat. The matrix TargetMat is automatically resized to match the size of the matrix InMat. The function returns the following error codes:
 0 ... everything is OK
-1 ... the source matrix has zero size
Hint: Please note that the statement "Mat1 := Mat2;" does not copy the contents of matrix Mat2 into matrix Mat1. It simply copies the pointer to Mat2 into the variable Mat1 which in effect means that both variables are using the same memory after the assignment.