k12 = 0.03;

delB = linspace(-10*k12,10*k12,1000);

T = k12^2./(k12^2+delB.^2).*sin(pi/2*sqrt(k12^2+delB.^2)/k12).^2;

plot(delB,T,'r--');

xlabel('{\Delta}{\beta} [{\mu}m^{-1}]');

ylabel('Power transfer function (port 1 --> 2)');

title('Problem 4: Coupler switch');

