week2 MATLAB script