For loop summation/ limit
3 次查看(过去 30 天)
显示 更早的评论
I am trying to write a script that computes (4N^2)/((4N^2)-1) for N = 10, 100, 1000, 10000. Then use the results to estimate the limit. This is the script I have. I know something is wrong because for N=10 the result is 2.0507. Any tips or troubleshooting would be appreaciated
y=2;
N=10;
for i=1:N
y=y*((4*N^2)/((4*N^2)-1))
end
y
2 个评论
Star Strider
2019-3-26
What series are you intending to code?
What is the result supposed to be for 10, 100, 1000, 10000 ... ?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!