Calculating arc length of a curve
18 次查看(过去 30 天)
显示 更早的评论
I have the trajectory for an object moving on a plane as shown in the figure. Can any one give me an idea to calculate the arc length of this curve? Sample data along with the trajectory plot is attached.
0 个评论
采纳的回答
Torsten
2018-11-19
Use Pythagoras' theorem:
n = numel(x);
length = 0.0;
for i = 1:n-1
length = length + sqrt( (x(i+1)-x(i))^2 + (y(i+1)-y(i))^2 );
end
6 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 3-D Scene Control 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!