% Jake Bobowski
% August 17, 2017
% Created using MATLAB R2014a

% Function to calculate the factorial of n.
function f = fact(n)
    f = prod(2:n);          % The product of n*(n-1)*(n-2) ... 4*3*2 = n!
end