I am currently working on image segmentation and I would like to see the working of clustering techniques such as Kmean and SOM. If you have the working MATLAB code, kindly share.
On the previous answer, Rinat already gave lot of resources. But I think you need to go thru step by step for a better understanding. Check this link below:
http://aqibsaeed.github.io/2016-06-24-k-means/
Here the author explains very nicely. Also you can check it.