fix k-means algorithm and remove matlab .m~ file