MATLAB Answers


Determining point is within polygon or outside.

Kaleesh Bala さんによって質問されました 2018 年 7 月 25 日
最新アクティビティ Adam Danz
さんによって コメントされました 2018 年 7 月 25 日
so far I have coded a profile and a user input to plot the points if inside or outside. any improvement to the code is appreciable

  9 件のコメント

Adam Danz
2018 年 7 月 25 日
'in' and 'on' have no values. If you run the code you provided, it will break when it tries to execute 'in'. I don't know what 'in' and 'on' represent or what their values 'should' be. I'm guessing they are indices and their values are probably [0 1] or [1 0].
If you have a more clearer or specific question maybe I can help. But the biggest problem in your current code is that 'in' and 'on' have no values.
Kaleesh Bala 2018 年 7 月 25 日
Thanks für the reply. I actually tried using inpolygon for the code ,it didn't worked well as I'm selecting only 2 coords as user input .I think it works with random points. So here im trying to print a statement saying ginputs are within profile or outside profile using inpolygon Function. Actually the present code shows the points in and out in colours. I need to attach a print statement to it .
Adam Danz
2018 年 7 月 25 日
Kaleesh,m see your other thread where I answered this question. inpolygon() does work well with your code.

サインイン to comment.

0 件の回答

Translated by