Question: Using MatLab 3) A Fibonacci sequence is composed of elements created by adding the two previous elements. E.g., [1, 1,2, 3, 5, 8, 13, ...].

Using MatLab  Using MatLab 3) A Fibonacci sequence is composed of elements created

3) A Fibonacci sequence is composed of elements created by adding the two previous elements. E.g., [1, 1,2, 3, 5, 8, 13, ...]. One interesting property of a Fibonacci sequence is that the ratio of the values of adjacent members of the sequence approaches a number called "the golden ratio." a) Initialize a vector x to [1, 1, 2]. Use a 'while' loop to calculate additional values in the sequence until the ratio of adjacent values converges to within 0.001. Hint: Calculate the difference between the ratio of element k to element k-1 and the ratio of element k-1 to element k-2, then check if this is within the given tolerance). Then, use a for' loop to create a vector r of the ratios between the adjacent values in x, and plot the ratios to show the convergence. b)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!