function AFnorm=ArrayFactor(t)
rad=pi/180;
N=48;
n=1:N;
d=.585;
k=2*pi;
x=(2*n-(N+1))/2*d;
xmax=max(abs(x));
xnorm=x/xmax;
A=0.2+0.8*cos(pi*xnorm/2).^2;
thetas=45;
Exp=exp(-j*k*x*sin(thetas*rad));
AF=abs(sum(A.*Exp.*exp(j*k*x*sin(t*rad))));
AFnorm=abs(AF/sum(A)-0.707);

