Matlab code for solving the exponential fitting problem