updated matlab scripts