Help with For End loop

6 ビュー (過去 30 日間)
Hasan
Hasan 2014 年 11 月 1 日
コメント済み: Image Analyst 2014 年 11 月 1 日
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

採用された回答

Image Analyst
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 件のコメント
Hasan
Hasan 2014 年 11 月 1 日
i still dont get it
Image Analyst
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 ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by