title: how can I determine how many times do I need to iterate in k mean cluster
body: <p>I'm working on Matlab project for kmean clustering 
  while I was working I found difficulties understanding the different between MaxIter and Replicates
  <br> in my file I have 100 numbers of land size
  when I run my project three times I get difference plot each time in each plot the centroid and data point location change. 
  <br>For example<br>
  First run > centroid location is x 5 , y 3 <br>
  second run > centroid location is x 3, y 2 <br>
  third run > centroid location is x 2 , y 6 <br>
  fourth run > centroid location is x 5 , y 3 <br>
  fifth  run >centroid location is x 3, y 2 <br>
  and the same pattern keep repeating <br> 
  so I was wondering is this normal to happen should I just take the answer/graph from the first run or the third run? 
  as you can see from my code I iterate the data 3000 times which is just random number. However now I'm not sure if that correct due ti the problem that I got which is different plot in the first three run of the project 
  how can I determine how many times do I need to iterate in k mean cluster  </p>
  
  <pre><code>Array=csvread('data.csv');
    dataset = Array(:,[1:2]);
  
  
    optns = statset('MaxIter',3000);
  
     [idx,C] = kmeans(dataset,2,'Distance','cityblock',...
         'Options',optns);
  
    figure;
    plot(dataset(idx==1,1),dataset(idx==1,2),'r.','MarkerSize',20)
  </code></pre>