Initial import of Luke's MATLAB code.