fix MATLAB script error