add some matlab file and fix bugs