r0 = linspace(0,3);

T00 = 1-exp(-2*r0.^2);

T10 = 1-exp(-2*r0.^2).*(1+2*r0.^2);

plot(r0,1-T00); hold on;

plot(r0,1-T10,'r--');

xlabel('Aperture size r_0 in units of beam width w');

ylabel('Aperture losses');

grid on;

title('Problem 3(a): Losses introduced by iris on TEM00 and TEM10/01 modes');

legend('TEM00 losses','TEM10/01 losses');