inpolygon help to find number of integer points

1 Ansicht (letzte 30 Tage)
Jenny Briggs
Jenny Briggs am 10 Mär. 2016
Bearbeitet: Jenny Briggs am 10 Mär. 2016
Hi, i've been trying to write a code to find the number of integer set of coordinates (x,y) within a circle. I'm trying to do this on a circle (0,0), radius 4 below. However the code I've made keeps giving me the wrong answer. It'd be much appreciated if anyone could help me on this or correct my code, thanks.

Akzeptierte Antwort

Torsten
Torsten am 10 Mär. 2016
Bearbeitet: Torsten am 10 Mär. 2016
You only consider points (xq,yq) which have the same x- and y- coordinate.
This will give you a wrong answer.
Use meshgrid to generate all combinations of xq- and yq- coordinates.
Best wishes
Torsten.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by