An improved Octave and MATLAB mex interface for the levmar Levenberg-Marquardt non-linear least-squares function library for C/C++ by M. Lourakis. The main improvement is that function handles can be used to specify a function to be minimized and its Jacobian.