Text this: Scattering Analysis of Rectangular Cavity with Input and Output Waveguides and Its Application to Material Characterization