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

4 vues (au cours des 30 derniers jours)
Wesley
Wesley le 4 Déc 2020
Commenté : Wesley le 4 Déc 2020

Réponse acceptée

KSSV
KSSV le 4 Déc 2020
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 commentaire
Wesley
Wesley le 4 Déc 2020
Thank you very much for solving my problem in time. Your program is very helpful.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by