I need to divide up a 2D surface containing 20,000,000 points into multiple segments (eg 100) such that each 2D segment contains an equal amount of points. I have looked into histogram bin widths, but cannot seem to correctly manipulate it.
EDIT Cedric: including the comment below
I should have specified in the question, I am using a triangular mesh initially defined by the delaunay function across a set of equally spaced grid points, using inpolygon I find the number of points within a segment and alter the locations of the segment nodes. The code is run until convergence to a density range.
I hoped there would be some form of code or functions around to deal with this situation or a form of dynamic gridding.

댓글 수: 2

Cedric
Cedric 2017년 10월 7일
편집: Cedric 2017년 10월 7일
There is likely no regular rectangular binning geometry that can satisfy what you are asking for, unless the points are almost perfectly homogeneously distributed (or if there are fluctuations in the density of points but only in one direction). Draw a rectangle on a sheet of paper, place randomly 10 points, and you will see that you will likely not be able to find a rectangular grid that has the property that you are asking for.
You can likely find some triangular mesh or rectangular multi-scale grid designed for that purpose though, but at least for the rectangular multi-scale grid there will not be a strictly equal amount of points in each cell (and it is not binning as people usually define it, and it requires quite a bit of work).
Adam Calvetti
Adam Calvetti 2017년 10월 7일
I should have specified in the question, I am using a triangular mesh initially defined by the delaunay function across a set of equally spaced grid points, using inpolygon I find the number of points within a segment and alter the locations of the segment nodes. The code is run until convergence to a density range.
I hoped there would be some form of code or functions around to deal with this situation or a form of dynamic gridding.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Spatial Search에 대해 자세히 알아보기

질문:

2017년 10월 7일

편집:

2017년 10월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by