필터 지우기
필터 지우기

Calculating the length of a curve

조회 수: 4 (최근 30일)
Hossein
Hossein 2017년 1월 13일
댓글: Jyotish Robin 2017년 1월 17일
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
Jyotish Robin
Jyotish Robin 2017년 1월 17일
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 !

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by