How to blank data within a circle

I have some grid data (m*n matrix) of the surface ocean, extending to the land in some areas. I have the conterminous United States map as a circle. Is there a way that I can blank everything that lies inside the map circle?

 채택된 답변

Image Analyst
Image Analyst 2012년 1월 9일

0 개 추천

Not sure what you have. If you have vertex coordinates of some region then you can use poly2mask to create a binary mask of the image that is true in the region and false outside the region. Then you can say array2D(binaryMask) = 0 to zero it out.

댓글 수: 1

Leon
Leon 2012년 1월 9일
Thank you very much. I will try it out.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 NaNs에 대해 자세히 알아보기

태그

질문:

2012년 1월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by