%% Plot Gamma Function
% Plot the gamma function and its reciprocal.
% Use fplot to plot the gamma function and its reciprocal. The gamma function increases quickly for positive arguments and has simple poles at all negative integer arguments (as well as 0). The function does not have any zeros. Conversely, the reciprocal gamma function has zeros at all negative integer arguments (as well as 0).

fplot(@gamma)
hold on
fplot(@(x) 1./gamma(x))
ylim([-10 10])
legend('\Gamma(x)','1/\Gamma(x)')
hold off
grid on

% Copyright 2012 The MathWorks, Inc.