function f = fibonacci(n)

%*****************************************************************************80
%
%% fibonacci()  Fibonacci sequence.
%
%   f = FIBONACCI(n) generates the first n Fibonacci numbers.
%
%  Licensing:
%
%   Copyright 2014 The MathWorks, Inc.
%
%  Author:
%
%    Cleve Moler
%
%  Reference:
%
%    Cleve Moler,
%    Experiments with MATLAB
%    https://www.mathworks.com/moler
%
f = zeros(n,1);
f(1) = 1;
f(2) = 2;
for k = 3:n
   f(k) = f(k-1) + f(k-2);
end
