Fill area between x-y data

7 ビュー (過去 30 日間)
Aishwarya Rao 2023 年 4 月 11 日

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 日

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;
0 件のコメント-2 件の古いコメントを表示-2 件の古いコメントを非表示

サインインしてコメントする。

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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeBounding Regions についてさらに検索

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by