Info

此问题已关闭。 请重新打开它进行编辑或回答。

How to label the interior of region as 2 where as boundary is already labelled as 4 for an object using Matlab coding

1 次查看(过去 30 天)
I am using grids with width 10. I want the interior to be filled as 2. As shown in attached figure. Than I want to count all filled cells of 4 and 2. Regards for cooperation.

回答(1 个)

KSSV
KSSV 2019-7-18
AS you have coordinates for the boundary (i.e 4), use inpolygon and get the coordinates lying inside it. Label them or fill the value you want.

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by