function n_factorial = factorial(n)

if n == 0
	n_factorial = 1;
else
	n_factorial = n * factorial(n - 1);
end

