Equally spaced points along a nonlinear path
이전 댓글 표시
I have a path linear by parts that I need to equally divide with points. How do I do that?
채택된 답변
추가 답변 (1개)
John D'Errico
2024년 5월 27일
편집: John D'Errico
2024년 5월 27일
Simpler yet, just download my interparc from the file exchange. It allows you to do the operation in a variety of ways, using several variations of spline interpolant, or assuming piecewise linear segments.
It does all the work for you, and it is free.
x = randn(6,1);
y = randn(6,1);
% 500 points, equally spaced along the curve in arclength
Pspline = interparc(500,x,y,'spline');
plot(x,y,'ro',Pspline(:,1),Pspline(:,2),'-')

카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!