Calculating arc length of a curve
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hari krishnan
am 19 Nov. 2018
Kommentiert: Hari krishnan
am 19 Nov. 2018
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 Kommentare
Akzeptierte Antwort
Torsten
am 19 Nov. 2018
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 3-D Scene Control finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!