vastly clarified clustering_error.m code