%n1=1.2n0=1;n2=1.5;n1=1.2;langmuda=400*10^(-9);h=0:0.0001*langmuda/1.2:langmuda/1.2;x=n1*h;j0=0;j1=asin(n0*sin(j0)/n1);f=4*pi*n1*h*cos(j1)/langmuda;a=n0-n2;b=n0+n2;c=((n0.*n2)./n1)-n1;d=((n0.*n2)./n1)+n1;A=a^2*(cos(f/2).^2)+c^2*(sin(f/2).^2);B=b^2*(cos(f/2).^2)+d^2*(sin(f/2).^2);R=A./B;plot(x,R,'-r');hol