In mathematics the Fibonacci numbers arc a sequence of numbe

In mathematics, the Fibonacci numbers arc a sequence of numbers, which each number is the sum of the previous two. The first two numbers of the Fibonacci sequence are 0 and 1. So, the Fibonacci sequence has the following form: 0,1,1, 2, 3,5,8,13,21,34,55,89,144... Please write a MATLAB script file that finds the 50th number in this Fibonacci sequence. What is the number MATLAB finds?

Solution

Ans: 7.7787x109

Matlab Program:

x(1)=0;
x(2)=1;
for i=3:50
x(i)=x(i-1)+x(i-2);
end
x(50)

 In mathematics, the Fibonacci numbers arc a sequence of numbers, which each number is the sum of the previous two. The first two numbers of the Fibonacci seque

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site