Help with For End loop
6 次查看(过去 30 天)
显示 更早的评论
Use a For-end loop in a script file to calculate the sum of the first n terms of the series:
Summation sign on the top n bottom k=1 : ((-1)^k * k^2 +5k)/3^k Show the script file and the two results of n = 10 and n = 20.
WHAT IS THIS I DONT UNDERSTAND LOOPS HELP PLEASE IM BEGGING!!!. x.x
0 个评论
采纳的回答
Image Analyst
2014-11-1
n=10;
theSum = 0;
for k = 1 : n
theSum =
OK, that should be enough hint for you to finish your homework.
2 个评论
Image Analyst
2014-11-1
I didn't know this was a duplicate question. Then just use the answer Harry gave you in http://www.mathworks.com/matlabcentral/answers/160855-help-with-homework-please-loops-are-hard He did your entire homework question for you.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!