Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help! Fibonacci Numbers The Fibonacci sequence, which is strongly related to the golden ratio, is defined as Fo=0, F1 = 1. and F. =
Please help!
Fibonacci Numbers The Fibonacci sequence, which is strongly related to the golden ratio, is defined as Fo=0, F1 = 1. and F. = F.-1 + F -2 for cases where n>1. Greater than one? Yes, the cases of n= 0 and = I are defined for us above The first few numbers in this sequence are provided here just for context: 0.1.1.2.3.5.8.13.21.34.... Using a for loop, calculate the first 25 numbers in the Fibonacci sequence Next calculate the ratio between each of the numbers in the sequence. The ratio can be defined as R. F F As a hint for each of these challenges ask yourself do you start with 1 and go to 252 Or is it maybe something else that you need to start at or end at? Finally, plot both the sequence and the ratio against the iteration number Meaning the 20th term (x) against the 20th Fibonacci number ( And the 21st term (x) against the 20th ratio (y) (you aren't being tested on this plor this time but it's good to figure this out for when you will be assessed on it) Looking at your plot where does it look like the ratio has stabilized? Where does the ratio stop changing much? Curous to learn more? Check out the Wikipedia entry here https llen wikipedia org/wiku Fibonacci_number Script Save C Reset 1 F(1) ED 2 F (2) 1 3 for n = % what n should you go from and to? F(n) = % calculate this Fun 5 % you know what goes here 4 6 7 % Now write a for loop for calculating the ratio, R 8 9F % print the values of F 10 R % print the values of R (this is a strong hint you need a row vector called R for the assessment) 12 figure % create a new figure 13 X_n = % us your matrix skills to create a vector that reflects what we want to use for the x when we plot F 14 plot(x_n, % we need to fill in the rest here... 15 % repeat the above few lines, but for plotting R Assessment: Does your sequence match the Fibonacci sequence? Does your ratio match the solutionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started