Azzera filtri
Azzera filtri

Calculating the length of a curve

4 visualizzazioni (ultimi 30 giorni)
Hossein
Hossein il 13 Gen 2017
Commentato: Jyotish Robin il 17 Gen 2017
Hi everyone,
can anybody tell me how to calculate the length of a curve being defined in polar coordinate system using following equation? z=21-2*cos(1.5*(tet-7*pi/6))
for tet=[pi/2:0.001:pi/2+2*pi/3].
I put the code here too and many thanks in advance.
tet=[pi/2:0.001:pi/2+2*pi/3];
z=21-2*cos(1.5*(tet-pi/2-pi/3));
polar(tet,z)
  1 Commento
Jyotish Robin
Jyotish Robin il 17 Gen 2017
To find the length of a curve y=f(x), we can make use of the formula:
L =integral(sqrt(1+(dy/dx)^2));
Now you can make use of the functions "diff" and "int" in MATLAB to perform differentiation and integration operations.
As an alternative to "int" function, you can try using "quad" function also.
Hope this helps !

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by