I just have one simple question. How do i calculate the integral of this area?

조회 수: 4 (최근 30일)
r=@(z)2+sin(5*z+2.2*cos(5*z));
z=linspace(0,2*pi);
x=r(z).*cos(z);
y=r(z).*sin(z);
plot(x,y)

채택된 답변

Star Strider
Star Strider 2017년 10월 15일
One approach:
r=@(z)2+sin(5*z+2.2*cos(5*z));
z=linspace(0,2*pi);
x=r(z).*cos(z);
y=r(z).*sin(z);
Ixy = cumtrapz(z, abs(r(z)));
Check = max(abs(r(z)))^2 * pi; % Area Must Be Less Than Maximum Circle Area
plot(x,y)
axis equal
text(0, 0, sprintf('Area = %.2f', Ixy(end)), 'HorizontalAlignment','center', 'VerticalAlignment','middle')
  댓글 수: 6
Walter Roberson
Walter Roberson 2017년 10월 16일
Note that the original question was one of discrete calculation, a finite number of specific z values. The integral() approach is for continuous z.
Torsten
Torsten 2017년 10월 16일
But the formula to calculate the area inside the parametric curve (x(z),y(z)) is not abs(r(z)), discrete or not ...
Best wishes
Torsten.

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

추가 답변 (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