Further changes to matlab scripts