Unfinished Matlab codes PLEASE DO NOT USE