I have a square matrix M with 25x25 dimension.
Then I want to create 25 matrices as follow:
- the first matrix is matrix
Mwithout the first row and first column, - the second matrix is matrix
Mwithout the second row and second column, - ... so on until 25th matrix.
lapply(1:25, function(i) M[-i, -i])