How can I plot the graph of this double integral function in Matlab?
10 views (last 30 days)
Show older comments
Comfort Sekga
on 28 Sep 2022
Edited: Walter Roberson
on 28 Sep 2022
I'm trying to plot the a graph of eta against r but I'm getting errors.
r = linspace(10^-2,10^2);
for delta = [1 2 3 4 5 6]
f=@(x,y) x.*exp(-3.44.*r.^(5./3).*x.*(sin(y./2)).^(5./3)).*cos(delta.*y);
eta = integral2(f,0,1,0,2*pi);
plot(r,eta)
loglog(r,eta)
end
How can i plot the graph of the integral? Thanks in advance!
0 Comments
Accepted Answer
David Hill
on 28 Sep 2022
r = linspace(10^-2,10^2);
eta=zeros(size(r));
hold on;
for delta= [1 2 3 4 5 6]
for k=1:numel(r)
f=@(x,y) x.*exp(-3.44.*r(k).^(5/3).*x.*(sin(y/2)).^(5/3)).*cos(delta*y);
eta(k) = integral2(f,0,1,0,2*pi);
end
plot(r,eta)
end
0 Comments
More Answers (0)
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!