Updated Matlab wrapper for motion correction