ProductName  

Returns a new matrix that contains a subset of the current matrix.

Syntax

MatrixObject.SubMatrix(RowStart, RowEnd, ColStart, ColEnd)

Parameters

RowStart
Long integer specifying the first row to include.
RowEnd
Long integer specifying the last row to include.
ColStart
Long integer specifying the first column to include.
ColEnd
Long integer specifying the last column to include.

Remarks

The RowEnd parameter can contain a smaller value than RowStart. In this case the returned matrix is flipped horizontally. The same way, if ColEnd is smaller than ColStart, then the returned matrix is flipped vertically.

Error Codes

Error 1319 will be returned, if any of RowStart, RowEnd parameters exceed matrix size.

Error 1320 will be returned, if any of ColStart, ColEnd parameters exceed matrix size.|

See Also

Applies To: Matrix | CMatrix