Let us suppose I have a square matrix (6×6 for example). I need to raplace the diagonal square submatrices (2×2) by zeros:
Original matrix:
[12 89 64 125 98 856 15 56 36 874 320 523 6 54 54 692 703 147 8 128 65 632 904 236 98 78 74 541 106 569 5 69 71 446 205 832]
Final matrix:
[0 0 64 125 98 856 0 0 36 874 320 523 6 54 0 0 703 147 8 128 0 0 904 236 98 78 74 541 0 0 5 69 71 446 0 0]
Best Answer