As a part of the project I'm working on, the input matrix needs to be deflated, meaning split into 2 parts. These parts are the upper left and lower right portions of the original matrix, and certain operation needs to be performed there. When in the process of deflation(splitting) we encounter a 1x1` matrix, we should stop and print that matrix. Take a look at the following code:
The idea is to print out n(where n is the number of rows/columns of the input matrix) 1x1 matrices, but the code above sometimes reaches n print outs, but more frequently less than n printouts. Any idea why this happens? Thanks