for loop continued fraction
Ältere Kommentare anzeigen
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 Kommentare
Kevin Phung
am 29 Mai 2019
What exactly is happening in each iteration? The picture is a bit confusing.
are you trying to do 1 + (1/1+n)?
Star Strider
am 29 Mai 2019
Experiment with it to get the result you want.
Antworten (1)
James Tursa
am 29 Mai 2019
0 Stimmen
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.
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!