Sum of a series?

2 ビュー (過去 30 日間)
John Mitchell
John Mitchell 2019 年 10 月 15 日
コメント済み: Matt J 2019 年 10 月 15 日
I'm having some trouble even finding somewhere to start with these problems, where I have to find the sum of these without using for loops:
1) 1/(1*2) + 1/(2*3)+ 1/(3*4)+ 1/(4*5)+....1/(99*100)
2) e^1-e^2+e^3-e^4....+e^99-e^100
3) x+ x^2/2 + x^3/3 + x^4/4 +.... x^10/10 for x = 0.5

回答 (1 件)

Matt J
Matt J 2019 年 10 月 15 日
Hint:
>> 1./(1:5)
ans =
1.0000 0.5000 0.3333 0.2500 0.2000
  4 件のコメント
John Mitchell
John Mitchell 2019 年 10 月 15 日
Thank you so much! I got the first one to work now, and I think I have a idea of how to do the third one, but I am still clueless on how to do the changing signs of the second one
Matt J
Matt J 2019 年 10 月 15 日
The second one is a geometric series with ratio r=-exp(1). It has a closed form formula.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by