imcircle

The file develops an "n by n" matrix containing a solid circle of ones of diameter "n" pixels.
8.9K Downloads
Updated 29 Jan 2008

View License

The file develops an 'n by n' matrix containing a solid circle of ones of diameter 'n' pixels, over a background of zero pixels.

Pixel positions are calculated on a nearest-fit basis, using trigonometry.

Such a circle can be an image, or part of an image, or an image mask.

A hollow circle (line circle) is also possible.

Cite As

John T. McCarthy (2026). imcircle (https://uk.mathworks.com/matlabcentral/fileexchange/128-imcircle), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0.0

Up to now, this file generated only a solid circle (disk).

I wish to include an option to have a hollow circle (line circle).