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


Copy2DColTo1DArray

Declaration: Copy2DColTo1DArray (Src: TDouble2DArray; Col, FirstRow, LastRow: integer; var Dest: TDoubleArray; DestElem): integer;
The function Copy2DColTo1DArray copies the contents of the column Col of the two-dimensional source array Src to the one-dimensional destination array Dest. All rows of the column Col from given indices FirstRow to LastRow will be copied to cell DestElem and the subsequent ones. Indices are 0-based. Setting both parameters FirstRow and LastRow to zero values defaults to the entire column.

The function returns the following error codes:
 0 ... everything is OK
-1 ... SrcArr has size zero size
-2 ... FirstRow and/or LastRow do not constitute a valid range
-3 ... Col is not valid
-4 ... the parameter DestElem is out of range (valid range: 0 to length(Dest)-1)