Calculating arc length of a curve
조회 수: 29 (최근 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에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!