% Tanalytical - algebraic expression for frequency-dependent 
% transmission coefficient in rectangular waveguide (Ass.3)

omega = 2*pi.*f;
k = omega.*sqrt(mu0*eps0);
%kc = sqrt((1*pi/Lx)^2 + (0*pi/Ly)^2);
kc = sqrt((1*pi/Lx).^2 + 0);
beta = sqrt(k.^2 - kc^2); 
beta = k.*sqrt(1-(fcTE10./f).^2)% alt. Cheng. pg. 528 eq 38
Tanalytical = exp(-1i.*beta.*Lz);
figure
plot(f, real(Tanalytical))