I have 12094*3 matrix and 7*2 matrix. Second matrix is coordinates of a polygon which is bounded. I used inpolygon method to analyse the region. I obtained 237 points inside 12094*3. Now i want to find third values of inside points which are third column of 12094*3. Since inpolygon method is 2 dimensional, i have only information about how many points of 7*2 inside in the 12094*3 matrix. I tried find command but it does not work. Although i have 237 points, there are 15 values in workspace i dont know maybe i did wrong.

1 件のコメント

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 1 月 17 日
編集済み: KALYAN ACHARJYA 2021 年 1 月 17 日
Explaining through Maths is much easier than lengthy text.

サインインしてコメントする。

 採用された回答

KSSV
KSSV 2021 年 1 月 17 日

1 投票

Let A be your 12094*3 matrix and P be your 7*2 matrix.
idx = inpolygon(A(:,1),A(:,2),P(:,1),P(:,2)) ;
iwant = A(idx,:) ;

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeComputational Geometry についてさらに検索

タグ

質問済み:

2021 年 1 月 16 日

コメント済み:

2021 年 1 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by