File Exchange

image thumbnail

ffcmw: The Fastest Fuzzy C-Means in the West!

version (3.96 KB) by Marco Cococcioni
A fast implementation of the well-known fuzzy c-means clustering algorithm


Updated 03 Jul 2019

View License

When you need to clusterize data, fuzzy c-means is an appealing candidate, being it more robust and stable than the k-means clustering algorithm. This implementation is faster than that found in the Fuzzy Logic Toolbox (fcm.m). In addition, you can run it without having to buy the FL Toolbox. With this entry I want to stimulate the involvment of other users, to further speedup it and with the ultimate goal to eventually find the TRUE fastest fcm in the West!!

Cite As

Marco Cococcioni (2020). ffcmw: The Fastest Fuzzy C-Means in the West! (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

Jie Feng

well done!

heba sal

thank you so much, please page number that explains the algorithm

Many people are asking me a reference to my fuzzy c-means implementation.
This implementation is aligned with the description provided in the following book:

Bezdec, J.C., Pattern Recognition with Fuzzy Objective Function Algorithms, Plenum Press, New York, 1981.

In addition, my implementation perform the same computations done by Matlab implementation by function fcm.m.

The only difference with fcm.m is that my version heavily uses Matlab vectorized functions. Only on for loop is used (the outher one).
This is way it is faster.

many thanks

Inyoung Bae

Hello. It works well. If you don't mind, can I get a paper or literature that describes this algorithm?

Hi Tan Yuki, I guess it can. But I need to better understood your problem.
Please drop me an email privately.
You can find my email address here:

Best Regards,


tan yuki

Hi. it really work very fast. Can this be implement on interest object's image rather than sample points?


Added two demos.

Little code polishing

A minor improvement in the description of the function.

Added more comments to the code

Uploaded the picture!

MATLAB Release Compatibility
Created with R2019a
Compatible with R2011a to any release
Platform Compatibility
Windows macOS Linux