Why is the radiation pattern does not show the required steering angle?
Show older comments
N = 16;%number of elements
wl = 1;%wavelength
k = 2.*pi./wl;
d = wl./2;%distance
f = zeros(1,180);%empty array for field
AF = zeros(1,100);%empty array for complec weights
thi = -45;%The scan angle
angle_radi = thi.*pi./180;%angle to radian
phi= (2.*pi.*d .*sin(angle_radi))./wl;%equation for phase shift
for a = 1:N %for loop to repeat until the Nth phase shift
AF(a)= (a-1).*phi;%First number = (1-1)*phi
while AF(a) > 2*pi
AF(a) = AF(a) - 2.*pi;
if AF(a)<= 2*pi;break;end
end %minimize the data if it is larger than 2pi
while AF(a) < -2*pi
AF(a) =AF(a) + 2*pi;
if AF(a) >= -2*pi;break;end
end %maximize the data if it is smaller than -2pi
end%does not affect the result but mitigate the calculation
as = AF(2)+AF(3)+AF(4)+AF(5)+AF(6)+AF(7)+AF(8)+AF(9);%weights in total
for th =1:360 %angle from 1 to 360
s = 0
angle_1rad(th) = th.*pi/180;%angle to radian
for i = 1:N
s = s + exp((-1j).*k.*(i-1).*d.*sin(angle_1rad(th))+as)%equation for field
end
f(th)= abs(s);
end
M = max(f);
z = f./M;%normalize the data
figure
polarplot(angle_1rad+as,z);
%title('linear polar plot');
Accepted Answer
More Answers (0)
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!