K-means clustering

This code implements K-means Clustering

You are now following this Submission

Demo.m shows a K-means clustering demo
kmeans_function folder contains following files to show how it works as a function:
Test.m
km_fun.m

K-means clustering is one of the popular algorithms in clustering and segmentation. K-means clustering treats each feature point as having a location in space. The basic K-means algorithm then arbitrarily locates, that number of cluster centers in multidimensional measurement space. Each point is then assigned to the cluster whose arbitrary mean vector is closest. The procedure continues until there is no significant change in the location of class mean vectors between successive iterations of the algorithms.

This code is used in the following paper:
A. Asvadi, M. Karami, Y. Baleghi, “Efficient Object Tracking Using Optimized K-means Segmentation and Radial Basis Function Neural Networks,” International Journal of Information and Communication Technology Research (IJICT), vol. 4, no. 1, pp. 29-39, December 2011.

Cite As

Alireza (2026). K-means clustering (https://se.mathworks.com/matlabcentral/fileexchange/52579-k-means-clustering), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0

Required products modified
description modified
Description modified
description modified
description modified
descripition modified

description modified
Image added