Performing a Double Integration
4 views (last 30 days)
Show older comments
McKinley Forster
on 11 Oct 2019
Answered: Sulaymon Eshkabilov
on 11 Oct 2019
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 Comments
Accepted Answer
Sulaymon Eshkabilov
on 11 Oct 2019
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 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!