Implementation of K-means algorithm based on matlab