PROGR

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

clc() N = input('no of array elements:') R = input (' side lobe level:') d= input('\nEnter the distance between the elements::->');

N1 = N-1 % number of zeros Ra = 10^(R/20); % sidelobe level in absolute units x0 = cosh(acosh(Ra)/N1); % scaling factor i = 1:N1; xi = cos(pi*(i-0.5)/N1); % N1 zeros of Tchebysheff polynomial psi = 2 * acos(xi/x0); % N1 array pattern zeros in psi-space zi = exp(j*psi); % N1 zeros of array polynomial c = real(poly(zi));% zeros-to-polynomial form (N coefficients) disp('the relative currents between the elements of array:') disp(c)

M = floor(N/2) Even = (N == 2*M); % True if no. of elements in array is even. if Even nend = M; else nend = M+1; end j=1; i=nend; for j=1:nend a(j) = c(i) j=j+1; i=i-1; end

c= 180*d; if Even %'N' is Even... %sum = 0; m=1:nend u = c*cosd(theta); AF = cumsum((a(m)*cosd((2*m-1)*u))) else %'N' is Odd... %sum = 0; m=1:nend u = c.*cosd(theta) AF = cumsum(a(m).*cosd(2.*(m-1).*u)) end

AF=abs(AF) theta= linspace(0,2*pi,360) polar(theta,AF)

You might also like