Analytically and numerically computed arc length
Mostra commenti meno recenti
Hi,
I'm trying to compute the length of a curve defined in parametric form:
t = linspace(0,pi); % Actually t could go from 0 to any angle lower than 2*pi
r = 1 ./ ( 1 - t / (2*pi) );
x = r.*cos(t); y = r.*sin(t);
dx = diff(x); dy = diff(y);
l = sum( sqrt(dx.^2 + dy.^2) ); % Arc length. Linear aprox.
This way the length is equal to 4.4725.
If I do the calculations analytically, I find the length is:
l = -2*pi*log( 1 - angle/(2*pi) ); % Being the initial point angle = 0
using angle = pi the result is 4.3552.
What's the reason of this difference?
Thanks in advance.
Risposta accettata
Più risposte (1)
Carlos
il 10 Lug 2012
0 voti
1 Commento
Walter Roberson
il 10 Lug 2012
No, it's okay, it will help other people in future.
Categorie
Scopri di più su Calculus in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
