for loop continued fraction

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 Commenti

Kevin Phung
Kevin Phung il 29 Mag 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
Star Strider il 29 Mag 2019
Use the deconv (link) function.
Experiment with it to get the result you want.

Accedi per commentare.

Risposte (1)

James Tursa
James Tursa il 29 Mag 2019

0 voti

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.

Categorie

Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange

Richiesto:

il 29 Mag 2019

Risposto:

il 29 Mag 2019

Community Treasure Hunt

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

Start Hunting!

Translated by