Fibonacci Sequence For Loop

6 visualizaciones (últimos 30 días)
Stephen King
Stephen King el 16 de Feb. de 2021
Respondida: Jemima Pulipati el 18 de Feb. de 2021
Write a script which calculates F(20). Using a for loop. At any given time you need only store the three active members of the sequence say F_Curr, F_Old, F_Older, which you will 'shuffle' appropiately. Refer to your current count as 'F_curr'
  2 comentarios
James Tursa
James Tursa el 16 de Feb. de 2021
What have you done so far? What specific problems are you having with your code?
Stephen King
Stephen King el 16 de Feb. de 2021
Honestly, knowing where to start. Very new to matlab and am quite stumped by this problem.

Iniciar sesión para comentar.

Respuestas (1)

Jemima Pulipati
Jemima Pulipati el 18 de Feb. de 2021
Hello,
From my understanding, you want to generate Fibonacci series using three variables inside a for loop.
The following answers from the community might be of relevance to you.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by