% Recursive definition of Fibonacci numbers

function [x] = fib(n)
  if (n==0) x=1;
  elseif (n==1) x=1;
  else x=fib(n-1)+fib(n-2);
  end
end
