version 1.5 (2.78 KB) by Mo Chen
Very fast matlab implementation of kmedoids clustering algorithm


Updated Wed, 23 Jan 2019 22:49:25 +0000

View License

This is a fully vectorized version kmedoids clustering methods ( It is usually more robust than kmeans algorithm. Please try following code for a demo:
close all; clear;
d = 2;
k = 3;
n = 500;
[X,label] = kmeansRnd(d,k,n);
y = kmedoids(X,k);
Input data are assumed COLUMN vectors!
You can only visualize 2d data!
This function is now a part of the PRML toolbox (

Cite As

Mo Chen (2022). Kmedoids (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!