Summation with FOR Loop
Ältere Kommentare anzeigen
Hello, Super noob question, but how do I do the attached picture in MatLab using a FOR loop. I just need to know how to set up the loop, not the actual values. Thanks for any help!

Akzeptierte Antwort
Weitere Antworten (3)
Arzu Ahmadova
am 22 Mai 2019
0 Stimmen
Hi,
Could you explain please how to code more than 2 different inifinite sums in loop?
1 Kommentar
Cameron Cooke
am 19 Okt. 2021
no
daniel domshlak
am 29 Mär. 2020
0 Stimmen
i=0;
x = input ('choose the initial value : ');
y = input ('choose final value : ');
n=(x:y);
summe=0;
for i=x:y
a=(i*2+1).^3;
summe = summe + a;
end
summe
3 Kommentare
daniel domshlak
am 29 Mär. 2020
not relevant to the qustion but I had an exersise to write a summation code not using sum function, and not found answears so i upload this.
daniel domshlak
am 29 Mär. 2020
if someone finds a way to shorten this, don't hassitate to sahare.
Arzu Ahmadova
am 29 Mär. 2020
Thanks
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!