How to write this summation series?

5 ビュー (過去 30 日間)
Pablo Garcia
Pablo Garcia 2018 年 11 月 1 日
回答済み: Yash Ubale 2018 年 11 月 12 日
S=2*r^3 + 4*r^5 + 6*r^7+ 8*r^9 + ... + (2n)*r^(2n+1). Display the sum in the main script with 3 decimal places.
  1 件のコメント
the cyclist
the cyclist 2018 年 11 月 1 日
Sounds like homework. Show us what you've tried, tell us where you're stuck, and you'll probably get some help.

サインインしてコメントする。

回答 (1 件)

Yash Ubale
Yash Ubale 2018 年 11 月 12 日
Here is the sample code which you can use to find the summation of the above series by appropriately setting the values of 'n' and 'r'.
It is highly encouraged to first try out on your own and then ask for the solution or code.
r = 1.1;
n = 10;
sum = 0;
for i = 1 : n
sum = sum + 2*i*r^(2*i+1);
end
fprintf('Sum is : %.3f\n',sum);

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by