필터 지우기
필터 지우기

Vector to Circle in Matrix

조회 수: 1 (최근 30일)
martin martin
martin martin 2019년 3월 14일
답변: Akira Agata 2019년 3월 15일
Hello guys, I am trying to fill the matrix (zeros) of values of vector into a circle shape.
A = zeros(50)
This is sketch of my intention, any idea how to fill point in circle?

채택된 답변

Akira Agata
Akira Agata 2019년 3월 15일
If you have Image Processing Toolbox, one solution would be like this:
A = zeros(50);
A(25,25) = 1;
D = bwdist(A);
idx = D <= 24;
A(idx) = 1;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by