for loop continued fraction

조회 수: 8 (최근 30일)
mozzi gi
mozzi gi 2019년 5월 29일
답변: James Tursa 2019년 5월 29일
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
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
Star Strider 2019년 5월 29일
Use the deconv (link) function.
Experiment with it to get the result you want.

댓글을 달려면 로그인하십시오.

답변 (1개)

James Tursa
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.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by