function delay_res = generate_delay(dim,tau,Ts)
% generate the delay response of the antenna array

if tau < 0
    delay_res = 0;
    return
else
    delay_res = zeros(dim,length(tau));
    for i=1:dim
        delay_res(i,:)=exp(-1j*2*pi*(i-1)*tau/Ts);
    end
end

end