% Code to generate array response vector for a ULA 
% towards a specified direction in terms of direction of arrival (in
% degrees)
% M - number of antennas
% Delta - inter-element spacing (in wavelengths)

function a=gen_a(M,Delta,theta)

a=exp(1j*2*pi*(0:1:M-1)'*Delta*sin(theta(:)'*pi/180));
