title: Matlab - Euclidian distance between two matrix
body: <p>I have declared 2 matrixes like this:</p>
  
  <pre><code>a = [ 1 2;
        11 12];
  
  
  [m, n] = size(a);
  
  b = a(2,:); 
  
  dist( b , a ); % the first column is not interesting
  </code></pre>
  
  <p>This works, I get a vector </p>
  
  <pre><code>[ 10.0499 9.0000 ]
  </code></pre>
  
  <p>However if I want to add a column or a line to my matrix a:</p>
  
  <pre><code> a = [ 1  2  3 ;
         11 12 13];
  </code></pre>
  
  <p>then apply the same algorithm, than above, ignoring or not the first column, I get this error:</p>
  
  <pre><code>Error using -
  Matrix dimensions must agree
  </code></pre>
  
  <p>I have no idea why it does not work, can someone explain to me please?</p>
  
  <p>Actually I don't even know how to retrieve the way this euclidian distance is computed, I failed at trying to retrieve those values [ 10.0499 9.0000 ] by hand. 
  The Matlab mathworks manual says he algorithm used is the following:</p>
  
  <pre><code>d = sum((x-y).^2).^0.5
  </code></pre>
  
  <p>Any help</p>