Solution of Waveguide Discontinuities by Modal Analysis