title: Efficient Implementation of `im2col` and `col2im`
body: <p>MATLAB's <a href="http://www.mathworks.com/help/images/ref/im2col.html" rel="nofollow"><code>im2col</code></a> and <a href="http://www.mathworks.com/help/images/ref/col2im.html" rel="nofollow"><code>col2im</code></a> are very important function for vectorization in MATLAB when dealing with images.<br>
  Yet they require MATLAB's Image Processing Toolbox.</p>
  
  <p>My question is, is there an efficient (Vectorzied) way to implement the using MATLAB's functions (With no toolbox)?<br>
  I need both the <code>sliding</code> and <code>distinct</code> mode.</p>
  
  <p>I don't need any padding.</p>
  
  <p>Thank You.</p>