CopyArrayToLayer

Declaration: TMat4D.CopyArrayToLayer (SrcArray: TDouble2DArray; Col, Row, Layer, TimeSlot: integer): integer;
The method CopyArrayToLayer copies the cells of the dynamic array SrcArray into the 4D matrix. The parameters Layer and TimeSlot specify the layer and the timeslot of the matrix, the parameters Col and Row specify the first column and row to be used in the selected layer (the cell SrcArray[0,0] is copied to self[Col,Row,Layer,TimeSlot], all other cells are copied to higher column and row indices, see figure below).

If the source array does not fit into the matrix all excess cells are ignored. The function returns the following error codes:
 0 ... everything is OK
-1 ... Layer is out of range
-2 ... TimeSlot is out of range