Circle of zeros within a circle of ones in a matrix

7 次查看(过去 30 天)
I'm trying to add a filled circle of zeros within an already existing circle of ones in a matrix of zeros.
My current code for the circle of ones in a matrix of zeros:
[x,y] = meshgrid(1:500,1:500);
cir = sqrt((x-250.5).^2+(y-250.5).^2)<=250;

回答(1 个)

Image Analyst
Image Analyst 2022-3-4
Code samples are in the FAQ. You will be able to easily modify them.

类别

Help CenterFile Exchange 中查找有关 Just for fun 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by