Circle of zeros within a circle of ones in a matrix

조회 수: 2 (최근 30일)
wbenn7
wbenn7 2022년 3월 4일
답변: Image Analyst 2022년 3월 4일
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