Suppose I have a (n x p) matrix M. Can a "for" loop be written to partition M into a set of smaller matrices A_i where A_1 = the first r_1 rows of M, A_2 = the next r_2 rows of M, A_3 = the next r_3 rows of M,………, A_k = the last r_k rows of M where k<=n ?
I know I can index into M easily with A(i,j) being the element corresponding to the i'th row and j'th column of M. What I want to do is "pull out'' matrices from M: A_1, A_2, A_3, …. , A_k as described above. I don't want to define each matrix manually however as I would have to define thousands of sub matrices A_i !
Any help would be greatly appreciated.
Jonathan
Best Answer