Numerical study of the MHD spectrum in tokamaks with a non-circular cross-section