Summation, Please help i will buy you a cookie :D
古いコメントを表示
I thought i had figured out summation, but apparent not :( I have a text book question that asks " evaluate series Σ Un (to infinity, with n=1) and Un is not known." The book gives you Un+1 = (Un)^2 with U1 = 0.5. Stop summation at Un < 10^-8 My code i wrote myself is
n = 2;
v = 10^-10
for ii = 0.5:length(v);
sum= (ii)^n;
end;
disp(sum)
Why does it not work....please help! :D
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2014 年 2 月 11 日
Have you checked the length of v?
Don't use sum as variable (sum is a Matlab built-in function)
When you write
a=10
a=20
a=1
What is the final result?
3 件のコメント
S Weinberg
2014 年 2 月 11 日
編集済み: S Weinberg
2014 年 2 月 11 日
Azzi Abdelmalek
2014 年 2 月 11 日
編集済み: Azzi Abdelmalek
2014 年 2 月 11 日
Have you checked the length of v?
Don't use sum as variable (sum is a Matlab built-in function)
What your for loop is doing?
S Weinberg
2014 年 2 月 12 日
カテゴリ
ヘルプ センター および File Exchange で Common Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!