How to assign cost to the overlaped points on the polygon?

조회 수: 1 (최근 30일)
SUSHMA MB
SUSHMA MB 2015년 4월 24일
편집: SUSHMA MB 2015년 4월 24일
I have used 'inpolygon' to find the points that are overlapped on a polygon. example: xv = [1 2 2 1 1 NaN 4 4 5 5 4 NaN 6 6 7 7 6];
yv = [0 0 3 3 0 NaN 1 2 2 1 1 NaN 4 5 5 4 4];
x = 1.5,2,9;
y = 3,7,8;
[in, idx] = inpolygon(x, y, xv, yv)
Now i want to assign some cost values to the points that are overlapping the polygons. For example if a point has overlapped the polygon then the cost of that point is 30, if not then 10. Can it be done? Please help me with this question.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Elementary Polygons에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by