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 Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by