Fix a MATLAB warning about nargchk being removed. Also remove trailing whitespaces.