Extracts a submatrix from a matrix (similar to NumPy slicing)
The source matrix
The starting row index (inclusive)
The ending row index (exclusive)
The starting column index (inclusive)
The ending column index (exclusive)
A new matrix containing M[minrow:maxrow, mincol:maxcol]
Extracts a submatrix from a matrix (similar to NumPy slicing)