PatternCode_Matlab