Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

in matlab 2. A Fibonacci sequence is generated by the following recursion, initi

ID: 3763918 • Letter: I

Question


in matlab

2. A Fibonacci sequence is generated by the following recursion, initialized at some arbitrary integer values of f and f2: Write a function fib that evaluates 2 up to N sequence values with usage: f fib(N,f1,f2); where fl,f2 are the two initial values. Internally, the function must use a for-loop and return the vector of values Run your function for N = 20, f,-0,fg=1, and plot fn vs. n. Then, repeat for fi = 1,f2-3.1n fact, use a semilogy plot and put both cases on the same graph The ratio of two successive Fibonacci numbers tends to the "golden ratio" for large , regardless of the initial values fi,fa: 1V5 = 1.6180. .. For N = 20, fi = 1, f2-3, calculate gn, 2 golden ratio level. n N, and plot it versus n, together with the straight line at the

Explanation / Answer

in matlab 2. A Fibonacci sequence is generated by the following recursion, initi