Can anyone help ,why is this statement of inpolygon not working in my code?

6 ビュー (過去 30 日間)
L K
L K 2017 年 2 月 13 日
コメント済み: L K 2017 年 2 月 13 日
I want to find if the points theta1 at radius1 whether they are inside the polygon or outside which is denoted by th_smaller at r_smaller
[in,on] = inpolygon(theta1,radius1,th_smaller,r_smaller);
numel(theta1(in))
numel(theta1(on))
numel(theta1(~in))
with this figure,if i run the code, i am getting all points as outside the polygon

採用された回答

KSSV
KSSV 2017 年 2 月 13 日
編集済み: KSSV 2017 年 2 月 13 日
Convert the points into Cartesian coordinates and use inpolygon.
Use pol2cart for conversion.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpline Postprocessing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by