Code covered by the BSD License  

Highlights from

3.7 | 3 ratings Rate this file 7 Downloads (last 30 days) File Size: 2.29 KB File ID: #6291 Version: 1.0



Timothy Felty (view profile)


15 Nov 2004 (Updated )

Calculates means and associated clusters from input data.

| Watch this File

File Information

Usage: [means,c]=KNMCluster(k,indata)

KNMCluster is an implementation of the K-means clustering algorithm. It takes inputs k and indata. k is the initial guess of the number of clusters.

indata is the aggregate data that you want to put into clusters.

The returned value "means" are the eturned means of the final clusters.

c is a structure with fields Clust1, Clust2, and so on for each of the k means.

Notes: This program makes use of Sara Silva's program shuffle found here on Mathworks. I would like to thank her for this nice little utility, it saved me some time which is always nice.

Tim Felty,


Shuffle Orderby inspired this file.

MATLAB release MATLAB 7.2 (R2006a)
Other requirements I originally wrote this in Matlab 6.5, the new version was redone in Matlab R2006a. However I don't think I have made any calls that wouldn't work in Matlab 6.5
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
09 Jun 2008 reesu satheesh


18 Apr 2008 Nora Spahiu

You did a good work, though you could have spent little more time on the multidimensionality of the the clusering.

Comment only
29 Nov 2004 Sun Bae  
19 Nov 2004 balijepalli krishna murthy


Contact us