Demanding that the classical equations of motion are preserved is not a strong enough condition to determine the matrix elements. The Planck constant does not appear in the classical equations, so that the matrices could be constructed for many different values of ħ and still satisfy the equations of motion, but with different energy levels.