Domanda

here is my question.

I have a dataset with x and y coordinates (point data). I have created an N x N matrix and I have divided the space into N x N grids. I put the counts of every grid cell into the corresponding matrix coordinate.

Now I would like to generate a circle in the N x N grid area. But since this is not real space but a grid space, I need to know which grid cells are on this circle. In other words, if my radius is 2 grid size then I want to have a list of the grids because I will get the total number of points using that grid counts.

I used moore neighborhood but Moore neighborhood is more of a rectangle. I am coding it in Matlab but any idea will be appreciated. Thanks.

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top