for loop continued fraction
조회 수: 8 (최근 30일)
이전 댓글 표시
i want use for loop this problem
the problem is 

what do i do?
x(n)=1+1/x(n-1) ?
i'm in tutorial line, so please explain easy
댓글 수: 2
Kevin Phung
2019년 5월 29일
What exactly is happening in each iteration? The picture is a bit confusing.
are you trying to do 1 + (1/1+n)?
Star Strider
2019년 5월 29일
Experiment with it to get the result you want.
답변 (1개)
James Tursa
2019년 5월 29일
Yes, you can use the formula x(n) = 1 + 1/x(n-1) if you want to use a loop. Just start with x(1) = 1.
댓글 수: 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!