How can I plot the graph of this double integral function in Matlab?

6 次查看(过去 30 天)
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!

采纳的回答

David Hill
David Hill 2022-9-28
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 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by