update matlab script