Ying's updated matlab files
some stuff kinda working
first two of Ying's matlab files
slight fix