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!