function f = fibnum(n)

%*****************************************************************************80
%
%% fibnum()  Fibonacci number.
%
%   FIBNUM(n) generates the n-th Fibonacci number.
%
%  Licensing:
%
%   Copyright 2014 The MathWorks, Inc.
%
%  Author:
%
%    Cleve Moler
%
%  Reference:
%
%    Cleve Moler,
%    Numerical Computing with MATLAB,
%    SIAM, 2004,
%    ISBN13: 978-0-898716-60-3,
%    LC: QA297.M625,
%    ebook: https://www.mathworks.com/moler/chapters.html
%
if n <= 1
   f = 1;
else
   f = fibnum(n-1) + fibnum(n-2);
end
