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!