Delete rows and columns from a dense matrix.