updated matlab scripts for haar & knearest