How can I plot the graph of this double integral function in Matlab?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Comfort Sekga
am 28 Sep. 2022
Bearbeitet: Walter Roberson
am 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 Kommentare
Akzeptierte Antwort
David Hill
am 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!