function f = fibnum(n)

%*****************************************************************************80
%
%% fibnum()  Fibonacci number.
%
%   FIBNUM(n) demonstrates recursion by generating the n-th Fibonacci number.
%   Warning: FIBNUM(50) takes a very long time.
%
%  Licensing:
%
%   Copyright 2014 The MathWorks, Inc.
%
%  Author:
%
%    Cleve Moler
%
%  Reference:
%
%    Cleve Moler,
%    Experiments with MATLAB
%    https://www.mathworks.com/moler
%
if n <= 1
   f = 1;
else
   f = fibnum(n-1) + fibnum(n-2);
end
