Updated MATLAB scripts