Fibonacci Sequence For Loop

6 次查看(过去 30 天)
Stephen King
Stephen King 2021-2-16
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 个评论
James Tursa
James Tursa 2021-2-16
What have you done so far? What specific problems are you having with your code?
Stephen King
Stephen King 2021-2-16
Honestly, knowing where to start. Very new to matlab and am quite stumped by this problem.

请先登录,再进行评论。

回答(1 个)

Jemima Pulipati
Jemima Pulipati 2021-2-18
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.

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by