Performing a Double Integration
조회 수: 3 (최근 30일)
이전 댓글 표시
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!
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!