MATLAB: Select elements of Matrix

matlab matrix element

Hi,
I have a 20×20 matrix, P. I wish to define a matrix Q such that the rows of Q are the LAST 18 rows of P (rows 2-20), and the columns of Q are the last 18 columns of P (columns 2-20).

Best Answer

It's basic matrix indexing:
Q = P(2:20, 2:20)