MATLAB codes written for the Coursera class