title: Misplaced centroid in clusters
body: <p>So I have a few clustering algorithms implemented, and I'm supposed to create an algorithm to normalize the data and compare clustering with and without normalization.</p>
  
  <p>What I have implemented is pretty simple, just the Min-Max normalization (I'm using Matlab btw):</p>
  
  <pre><code> function [dataNorm] = nMinMax(data)
   [x, y] = size(data);
   dataNorm = zeros(x, y);
  
   for j = 1:y
       m = min(data(:,j));
       M = max(data(:,j));
       for i = 1:x
           n = (data(i,j) - m)/(M-m);
           dataNorm(i,j) = n;
       end
   end  
   end
  </code></pre>
  
  <p>And this is what what I get from a clustering w/o normalization:</p>
  
  <p><img src="https://i.stack.imgur.com/7HFxw.jpg" alt="enter image description here"></p>
  
  <p>Now it's where it gets strange, after the normalization, this is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/28JGm.jpg" alt="enter image description here"></p>
  
  <p>The clusters are the same, when I thought it should have improved the results...</p>
  
  <p>So my question is, is there a problem with my algorithm or am I interpreting the results the wrong way? And if I am, what should the cluster look like after the normalization?</p>