SOM Toolbox Online documentation http://www.cis.hut.fi/projects/somtoolbox/

kmeans

[codes,clusters,err] = kmeans(method, D, k, epochs, verbose)

 KMEANS K-means algorithm.

 [codes,clusters,err] = kmeans(method, D, k, [epochs], [verbose])

  Input and output arguments ([]'s are optional):  
    method     (string) k-means algorithm type: 'batch' or 'seq'
    D          (matrix) data matrix
               (struct) data or map struct
    k          (scalar) number of centroids
    [epochs]   (scalar) number of training epochs
    [verbose]  (scalar) if <> 0 display additonal information

    codes      (matrix) codebook vectors
    clusters   (vector) cluster number for each sample
    err        (scalar) total quantization error for the data set

 See also KMEANS_CLUSTERS, SOM_MAKE, SOM_BATCHTRAIN, SOM_SEQTRAIN.



[ SOM Toolbox online doc ]