Create a vector to prove a sum of series?

1 回表示 (過去 30 日間)
Bridgit Nata
Bridgit Nata 2016 年 9 月 21 日
回答済み: James Tursa 2016 年 9 月 21 日
How can I prove the following series:
π^2/6 = 1 + 1/4 + 1/9 + 1/16 + ...
by creating a vector using colon operators and the function sum.
Thank you so much!

採用された回答

James Tursa
James Tursa 2016 年 9 月 21 日
Sounds like homework, but I will give you some hints:
v = 1:n; % <-- make a vector with the numbers 1, 2, 3, ..., n
1 ./ whatever % <-- does the divide element-by-element
whatever .^ 2 % <-- does the squaring element-by-element
So you should be able to combine the above operations appropriately to get the approximation you are after. (Although, as a nit, this will not "prove" it).

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by