MATLAB: How to reduce an existing matrix

MATLABmatrix manipulation

I would like to reduce an existing matrix (1885×1885) to (188×188), essentially discarding the last 5 rows and columns.
How would I code this. Thanks in advance.

Best Answer

I think you mean reduce it to (1880x1880).
M = M(1:end-5,1:end-5);