title: Getting all submatrices
body: <p>I have got an N×M matrix <code>m</code> like:</p>
  
  <pre><code> 1  2  3  4
   5  6  7  8
   9 10 11 12
  13 14 15 16
  </code></pre>
  
  <p>I want to get <em>all</em> submatrices of size P×Q (P,Q are odd) w/o employing a for-loop.</p>
  
  <p>The result <code>s</code> should be a P×Q×((N-P+1)·(M-Q+1)) matrix.</p>
  
  <p>E.g. if P=Q=3:</p>
  
  <pre><code>s(:,:,1) = [1 2 3;  5  6  7;  9 10 11]
  s(:,:,2) = [2 3 4;  6  7  8; 10 11 12]
  s(:,:,3) = [5 6 7;  9 10 11; 13 14 15]
  s(:,:,4) = [6 7 8; 10 11 12; 14 15 16]
  </code></pre>