Cox's Crazy Fast MATLAB Codez
cdiff1.m: Finite-difference derivative using Central Difference with O(h^2) accuracy. Very fast. Linearly interpolates the end points.
cdiff1mx.cpp: Same as above, but written in C. Handled real and complex numbers. ~6x faster than MATLAB code. Compile with "mex" command using MATLAB or other compiler.