MATLAB: I have a matrix of 4095 by 4. i need to divide it into submatrices of 117 by 1.

submatrices

How can I do this using for loop? I mean I have to select first 117 rows and 1st column then first 117 rows and 2nd column, then first 117 rows and 3rd column and then 1st 117 rows and 4th column. after that repeat this for next 117 rows and so on uptill 4095 rows.

Best Answer

Baserow = (column-1) * 117;
Subset = YourImage(Baserow+(1:117),column, :) ;
Related Question