Some functions useful for clustering and visualizing with matlab