Circle of zeros within a circle of ones in a matrix

2 Ansichten (letzte 30 Tage)
wbenn7
wbenn7 am 4 Mär. 2022
Beantwortet: Image Analyst am 4 Mär. 2022
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;

Antworten (1)

Image Analyst
Image Analyst am 4 Mär. 2022
Code samples are in the FAQ. You will be able to easily modify them.

Kategorien

Mehr zu Just for fun finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by