Implement Clustering Algorithm Matlab