Beth's first change to matlab