Fix data type problem of gsingle on normal computer and working half way to learnPMCode.m