function [f]=factorial(n)
% Compute the factorial of a positive integer number
if n< 0
f=[];
warning('The number is negative')
elseif n==0
f=1;
else
f=prod(1:n);
end