Find all the grid points that are inside of the circle
6 ビュー (過去 30 日間)
古いコメントを表示
I have my radius being between 1 and 10 and my angle from 0 to 2pi. I defined an uniform rectangular grid with 10 points (10 by 10) and I want to find how many points fall into the circle. Thanks a lot.
0 件のコメント
採用された回答
Star Strider
2021 年 4 月 22 日
2 件のコメント
Star Strider
2021 年 4 月 27 日
The inpolygon function can output the points in or on the polygon.
A polygon does not havve any defined shape, other than being a closed boundary, so a circle is a polygon.
It will work. (Since this appears to me to be homework, I did not post the code I wrote to check it to be certain that it does.)
.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Elementary Polygons についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!