fix MATLAB interface to solve #107