Performing a Double Integration

조회 수: 3 (최근 30일)
McKinley Forster
McKinley Forster 2019년 10월 11일
답변: Sulaymon Eshkabilov 2019년 10월 11일
I'm trying to find the area of a deformed circle using the following code:
% Perimeter Area of the Circle
Beta = 0.2
fun3 = @(x,y) (sqrt( (((1 + 6*Beta)*cos(x) - 6*Beta*sin(x) + 3*Beta*cos(2*x))^2) + (((1+2*Beta)*sin(x) - 2*Beta*cos(x) - Beta*cos(2*x))^2)));
xmin = 0;
xmax = 2*pi;
ymin = 0;
ymax = 1;
Perimeter_Area_of_Circle = integral2(fun3,xmin,xmax,ymin,ymax)
I keep getting several erros when I try to execute this and I can't figure out what I'm doing wrong.
Thanks!

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 11일
Hi,
Here is the corrected code of yours:
Beta = 0.2;
fun3 = @(x,y) (sqrt( (((1 + 6*Beta)*cos(x) - 6*Beta*sin(x) + 3*Beta*cos(2*x)).^2) + (((1+2*Beta)*sin(x) - 2*Beta*cos(x) - Beta*cos(2*x)).^2)));
xmin = 0;
xmax = 2*pi;
ymin = 0;
ymax = 1;
Perimeter_Area_of_Circle = integral2(fun3,xmin,xmax,ymin,ymax)
Good luck.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by