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!