MATLAB: Kmeans gives different results each time

kmeans

* *I have square binary similarity matrix show the social relation among users, where o means no relation between two users and 1 means there is relation between them.
I used kmeans to do clustering*
f1=dlmread('d:\matlab\r2011a\bin\paper_comm\link_flixster_bin1.txt');
c=kmeans(f1,3);
When run the kmeans more than one times, the results are different.
for example at firs time the cluster 1= 4448 users , cluster 2= 434, and cluster 3=118
But, in second times cluster 1= 4880 users , cluster 2= 119, and cluster 3=1
Why the results are different??*

Best Answer

kmeans uses random starting values. (READ THE HELP. I just did to verify this.) So why would you expect that the solution will be identical if the start points are not?