We have moved to @ Placement Papers Hub !! Visit our new website here for more..

MATLAB : FIBONIC SERIES , Generating the first Ten Fibonacci numbers according to the relation Fn = Fn-1 + Fn-2 with F0 = F1 = 1, and Computing the ratio Fn / Fn-1 for the first 50 Fibonacci numbers

MATLAB : FIBONIC SERIES , Generating the first Ten Fibonacci numbers according to the relation Fn = Fn-1 + Fn-2 with F0 = F1 = 1, and Computing the ratio Fn / Fn-1 for the first 50 Fibonacci numbers


>> f(1)=1;

>> f(2)=1;
>> for k=3:10
f(k)=f(k-1)+f(k-2);
end
>> disp(f)
     1     1     2     3     5     8    13    21    34    55

>> r=f(2:10)./f(1:9)

r =

    1.0000    2.0000    1.5000    1.6667    1.6000    1.6250    1.6154    1.6190    1.6176