How to make 2D boundary follow the data ?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have this data set (attached). I tried to find the boundary for it but the boundary doesn't follow outer data points exactly (as shown) especially at the corners. Though I tried to change shrink factor(s). Hope you can help me figure that out.
Thank you
x=Data(:,1);
y=Data(:,2);
s=1; %shrink factor
k = boundary(x,y,1);
Xbound=x(k);
Ybound=y(k);
plot(Xbound,Ybound);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167095/image.png)
댓글 수: 0
채택된 답변
Image Analyst
2017년 9월 8일
Try different shrink factors, the third argument. Try something between 0.1 and 0.9 until you find one that "hugs" your point set the best.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!