title: Minkowski distance and pdist
body: <p>Minkowski's distance equation can be found <a href="http://en.wikipedia.org/wiki/Minkowski_distance" rel="nofollow">here</a>.</p>
  
  <p>If we want to calculate the Minkowski distance in <code>MATLAB</code>, I think we can do the following (correct me if I'm wrong):</p>
  
  <pre><code>dist=pdist([x(i);y(j)],'minkowski');
  </code></pre>
  
  <p>Up till here, the above command will do the equation shown in the link.</p>
  
  <p>Now, to Minkowski's distance, I want to add this part <code>|-m(i)|^p</code>, where <code>m(i)</code> is some value. </p>
  
  <p>I saw the <code>pdist</code> source code, but, want to ask, how can I modify Minkowski's distance by adding this simple part, either in the <code>pdist</code> code, or from the calling code (I think we may have to make some change in the parameters).</p>
  
  <p>Thanks.</p>