title: Method to split a matrix into blocks of the small matrix
body: <p>I have a problem and would like to know if anyone could offer an ideal solution.</p>
  
  <p>Basically (small data) but, if I have a matrix like this:</p>
  
  <pre><code>     0 1 0 0
       1 1 1 0
       0 0 0 0
       1 1 0 0
  </code></pre>
  
  <p>I then need to split this matrix into blocks that are of the same size as the second matrix, in this case 2x2:</p>
  
  <pre><code>0 1
  1 1
  </code></pre>
  
  <p>I know it has something to do with the offsetX/Y values and these change depending on the size of the (small) matrix, I just don't know the calculation to calculate such results. I'm going to be passing the offsetX/Y to a function (with the vector) so I can calculate the sum of the particular block. </p>
  
  <p>Does anyone have any advice?</p>
  
  <p>Thanks</p>