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: http://heyoka.cs.uiuc.edu/~thite/mincircle/
Credit are due mainly to author of the applet.
Frank Staals (2020). Minimum Enclosing Circle (https://www.mathworks.com/matlabcentral/fileexchange/13389-minimum-enclosing-circle), MATLAB Central File Exchange. Retrieved .
Sorry, but I get wrong answers sometimes, and the circle is always larger......
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.
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.
I'm sorry, but I'm getting radius 0 always.
Inspired by: Minimum Enclosing Circle
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!