Majorization between the diagonal elements and the eigenvalues of an oscillating matrix