I am working on a matrix problem where I have an m*n matrix and I want to extract all 5*5 matrices from it by shifting one row and column but I am not able to extract all the 5*5 matrices but only once. Can you help me extract all the matrices?
I am able to extract the using Basic operations but how to extract all the submatrices using a loop
A=[(40 45 50 60 70 80), (10 12 15 17 18 20), (35 41 57 44 98 78), (45 74 11 2 36 78), (12 45 79 85 36 45), (1 5 8 78 47 3)]
A(1:5,1:5)
example input: [(40 45 50 60 70 80), (10 12 15 17 18 20), (35 41 57 44 98 78), (45 74 11 2 36 78), (12 45 79 85 36 45), (1 5 8 78 47 3)]
output: [(40 45 50 60 70), [(45 50 60 70 80), (10 12 15 17 18 ), (12 15 17 18 20), (35 41 57 44 98), (41 57 44 98 78), (45 74 11 2 36 ), (74 11 2 36 78), (12 45 79 85 36) ] (45 78 85 36 45)]
Something like this, I am able to extract the first output but not all the output