function T_hw=TMM_HomoWG_Matrix(wavelength,l,neff,loss)
% Calculate the transfer matrix of a homogeneous waveguide.
%Complex propagation constant
beta=2*pi*neff./wavelength-1i*loss/2;
T_hw=zeros(2,2,length(neff));
T_hw(1,1,:)=exp(1i*beta*l);
T_hw(2,2,:)=exp(-1i*beta*l);