As shown in the picture,how to fit discrete points to a closed curve?

조회 수: 5 (최근 30일)
Wesley
Wesley 2020년 12월 4일
댓글: Wesley 2020년 12월 4일

채택된 답변

KSSV
KSSV 2020년 12월 4일
Your points are no tin an order....first make them into an order using boundary.
load data1.mat ;
x = data1(:,1) ; y = data1(:,2) ;
idx = boundary(x,y) ;
x = x(idx) ; y(idx) ;
plot(x,y)
Hope the above one works, if you are okay with the above, you have your data into a polygon.
  댓글 수: 1
Wesley
Wesley 2020년 12월 4일
Thank you very much for solving my problem in time. Your program is very helpful.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by