% Factorial of n function number = f(n); number = 1; for i=1:n number = number*i; end end