Cluster Formation Code In Matlab