# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1323190153 18000 # Node ID 87433ad16bbf8adda461b2964511466cd76569c8 # Parent 9fbd50ad335ba40ea1c6d39c47661a418605ed66 Fix style diff --git a/kMeansInitCentroids.m b/kMeansInitCentroids.m --- a/kMeansInitCentroids.m +++ b/kMeansInitCentroids.m @@ -1,12 +1,11 @@ function centroids = kMeansInitCentroids(X, K) -##KMEANSINITCENTROIDS This function initializes K centroids that are to be -##used in K-Means on the dataset X -## centroids = KMEANSINITCENTROIDS(X, K) returns K initial centroids to be -## used with the K-Means on the dataset X -## + ##KMEANSINITCENTROIDS This function initializes K centroids that are to be + ##used in K-Means on the dataset X + ## centroids = KMEANSINITCENTROIDS(X, K) returns K initial centroids to be + ## used with the K-Means on the dataset X + ## ## Using second argument to randperm implemented in dev version centroids = X(randperm (rows (X), K), :); -end - +endfunction