title: Error: operator *: nonconformant arguments (op1 is rxc, op2 is rxc )
body: <p>I have implemented the following function to estimate <a href="https://codereview.stackexchange.com/q/146091/3804">Parzen Density of a matrix</a>,</p>
  
  <p><strong>parzen.m</strong></p>
  
  <pre><code>function [retval] = parzen (matrix, dataPoint, variance)
      [r c] = size(matrix);
      A = ones(r, c)*dataPoint;
      sub = matrix - A;
      up = sub.^2;
      dw = 2 * variance;
      firstPart = 1/(sqrt(2*pi*variance));
      retval = firstPart * exp((-1)*(up/dw));
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>&gt;&gt; parzen(train, test, 0.25)
  error: parzen: operator *: nonconformant arguments (op1 is 1824x8, op2 is 1824x8
  )
  error: called from
      parzen at line 3 column 4
  &gt;&gt;
  </code></pre>
  
  <p>How can I get rid of this error?</p>