function fprime = cdiff(f, x, h)
%CDIFF Central finite difference derivative.
%   FPRIME = CDIFF(F, X, H) computes the derivative FPRIME of the
%   function F at all values in X using a step size of H.
 
fminus = f(x - h);
fplus = f(x + h);
fprime = (fplus - fminus) / (2 * h);
