Matlab code process U1-U5.