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

5 visualizaciones (últimos 30 días)
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!

Respuesta aceptada

David Hill
David Hill el 28 de Sept. de 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

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by