Implementation of K-Means and Spectral Clustering Algorithms in Matlab