CellOf2DMat

Declaration: TMatlab5WorkSpace.CellOf2DMat (MatIdx: integer; ix, iy: integer; var Value: double): integer;
The function CellOf2DMat retrieves the cell value of the two-dimensional matrix of the workspace addressed by MatIdx and the cell coordinates ix and iy, and returns it in the variable parameter Value. The cell coordinates are 1-based.

The function returns one of the following error codes:

 0 ... everything OK, Value is valid
-1 ... MatIDx is out of bounds
-2 ... ix is out of bounds
-3 ... iy is out of bounds

Hint: The valid range of cell indices can be obtained by the function GetDims2DMat.