Correct Matlab error in step 1