title: Matlab - Why am I getting this error
body: <p>I have typed the following in <code>matlab</code>:</p>
  
  <pre><code>&gt;&gt; I=imread('23X41.jpg');
  &gt;&gt; fun = @(x) sum(x(:).^2)/sum(x(:)).^2; 
  &gt;&gt; en= nlfilter(I,[4 4],fun);
  </code></pre>
  
  <p>And, got the following error?</p>
  
  <pre><code>??? Error using ==&gt; plus
  Matrix dimensions must agree.
  
  Error in ==&gt; nlfilter at 52
  aa = mkconstarray(class(a), padval, size(a)+nhood-1);
  </code></pre>
  
  <p>Why am I getting this error especially that I'm sliding a <code>4x4</code> window on a <code>23x41</code> image? Why are the matrix dimensions mentioned here?</p>
  
  <p>Thanks.</p>