Matlab codes written during MFE