File Exchange

image thumbnail

Minimum Enclosing Circle

version (977 Bytes) by Frank Staals
Smallest Enclosing Circle around a group of points


Updated 15 Dec 2006

No License

This code takes an input of a set of given (x,y) points in the Cartesian coordinates and returns the center and radius of the minimum circle enclosing the points.

This code is based on that of Yazan Ahed, and contains no changes in the algorithm but only in the structure.

The previous code was written based on the very nice Java applet found here:
Credit are due mainly to author of the applet.

Cite As

Frank Staals (2020). Minimum Enclosing Circle (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)


Sorry, but I get wrong answers sometimes, and the circle is always larger......

z z

Pepito Grillo

please update

This program algorithm is not-true.
(max(pointada)-min(pointdata))/2 = R
This solution is not possible all node combination, if you your combination is linear than true else, not-true.

Jos Groot

I found the cause for getting radius 0: the
program expects 1xN input vectors, while
I supplied Nx1 vectors. I suggest to make
the program more robust.

Jos Groot

I'm sorry, but I'm getting radius 0 always.

r rekha

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

Inspired by: Minimum Enclosing Circle

Community Treasure Hunt

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

Start Hunting!