필터 지우기
필터 지우기

How to filter out annular data from square matrix

조회 수: 2 (최근 30일)
Bhowmik.U
Bhowmik.U 2018년 7월 7일
댓글: Bhowmik.U 2018년 7월 9일
Have a square matrix...501 by 501...Z=501×501
Need to filter out an annular data 20 to 150 centered at (251,251)

채택된 답변

Image Analyst
Image Analyst 2018년 7월 7일
See the FAQ for creating a circle:
Then to get row and column indexes for your matrix, simply round, making sure that x is the second dimension, not the first because arrays are indexes as array(y, x) NOT array(x,y)
rows = round(y);
columns = round(x);
for k = 1 : length(rows)
Z(rows(k), columns(k)) = 0; % Filter to have whatever value you want them to have.
end
  댓글 수: 3
Image Analyst
Image Analyst 2018년 7월 8일
Looks fine to me
Probably a rendering issue. Look at the opengl() function and try some different things.
Bhowmik.U
Bhowmik.U 2018년 7월 9일
Thanks again Sir!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Bhowmik.U
Bhowmik.U 2018년 7월 7일
Thanks for the suggestion..however I tried on similar lines but that yielded concentric boxes of data..rather than circles...

카테고리

Help CenterFile Exchange에서 Formatting and Annotation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by