how can i sum the 'y' above in the picture i have polt ?

1 view (last 30 days)

Answers (2)

Torsten
Torsten on 1 Oct 2022
Edited: Torsten on 1 Oct 2022
x = -2:0.001:2;
y = 1.8*exp(-x.^2);
plot(x,y)
sum(y)
ans = 3.1755e+03

VBBV
VBBV on 21 Oct 2022
y = 0;
for x = -2:0.001:2;
y = y + 1.8*exp(-x.^2);
plot(x,y,'bo','Markersize',1)
hold on
end
y
y = 3.1755e+03

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!