Effacer les filtres
Effacer les filtres

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

5 vues (au cours des 30 derniers jours)
L K
L K le 13 Fév 2017
Commenté : L K le 13 Fév 2017
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

Réponse acceptée

KSSV
KSSV le 13 Fév 2017
Modifié(e) : KSSV le 13 Fév 2017
Convert the points into Cartesian coordinates and use inpolygon.
Use pol2cart for conversion.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by