CopyTo2DMat

Declaration: TMatlab5WorkSpace.CopyTo2DMat (MatIdx: integer; var DestMat: TDouble2DArray): integer;
The method CopyTo2DMat copies a two-dimensional matrix of the MatLab 5 workspace to the matrix DestMat. The parameter MatIdx specifies the index of the array to be copied (valid range: 1...NrOf2DMats). The size of the destination matrix is automatically adjusted to the size of the source matrix.

The function returns one of the following error codes:

 0 ... everything OK, DestMat is valid
-1 ... MatIDx is out of bounds