Fill area between x-y data
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone!
I have a data as shown in the figure. I want to fill/find the polygon area with maximum probability (not necessarily circular, I need to find the shape). Can anyone please help me?
Thank you!
2 个评论
Matt J
2023-4-11
You'll need to define "maximum probability" for us. Are you sure you don't simply want to take the convex hull?
Walter Roberson
2023-4-11
Given the coordinates of any particular polygon, how would you calculate the "probability" of it?
回答(2 个)
Joe Vinciguerra
2023-4-11
编辑:Joe Vinciguerra
2023-4-11
xy = randn(100, 2);
shp = alphaShape(xy, inf);
area = shp.area;
facets = shp.boundaryFacets;
plot(shp, "LineStyle","none", "Marker","none")
hold on;
scatter(xy(:,1), xy(:,2))
grid on;
For more information see: Polygons and polyhedra from points in 2-D and 3-D - MATLAB (mathworks.com)
0 个评论
Image Analyst
2023-4-11
The polygon with the maximum density would be one that starts at one point and then snakes around until it has "grabbed" every point. The width of the snake would be infinitesimally small.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bounding Regions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!