l=1.3;
k=2*pi/l;
x1=.0:1/20:2;
%x1=zeros(1,20);n1=1.47;
a=4;delta=.003;
V=a*k*n1*(2*delta)^.5;
w0=a*(.65+1.619*V^(-1.5)+2.879*V^(-6));
x=a.*x1;
r=length(x);


a1=ones(1:r);
%a1=.896:.04:(r-1)*.04+.896;
s1=a.*a1;
a2=.89 :.04:.04*(r-1)+.89 ; 
s2=a*a2;
%sig=s1./s2;
sig=ones(1:r);
%z1=0:1:(r-1);
z1=zeros(1,r);
z=a.*z1;
%theta1=0:1:(r-1)*1;
theta1=zeros(1,r);
theta=(pi/180).* theta1;
s11=s1.^2;
p=k^2.*s11;
g=2*k*z./p;
g2=g.^2;
f=k*x./p;
f2=f.^2;
d=sin(theta);
d1=d.^2;

q=g.^2+(sig+1).^2;
u=(sig+1).*f2+2*sig.*(sig+1).*f.*sin(theta)+sig.*(g2+sig+1).*d1;
c0=4*sig./q;
y=p.*u./q;
t1=c0.*exp(-y);
w=-10*log10(t1);

