Followings are the code that I wrote in Matlab Phased Array System Toolbox to creates all the plots shown in this page. You may copy these code and play with these codes. Change variables and try yourself until you get your own intuitive understanding.
< Code 1 >
c = 3e8; % propagation speed
fc = 26e9; % carrier frequency
lambda = c/fc; % wavelength
ArrayDim = [16 2];
txarray = phased.URA('Size',ArrayDim,'ElementSpacing',[lambda/2 lambda/2]);
txarray.Element.BackBaffled = true;
steer_ang = [0;0];
stv = phased.SteeringVector('SensorArray',txarray);
w = stv(fc,steer_ang);
hFig = figure(1);
pattern(txarray,fc,[180:180],[90:90],...
'PropagationSpeed',c,...
'CoordinateSystem','polar',...
'Type','powerdB',...
'Weight',w);
set(gcf,'color','w');
axis([50 50 50 50 50 50]);
axis off;
%view(90,15);
view(135,15);
sTitle = sprintf("Antenna Array = %d by %d, Steering Angle=[%d %d]", ...
ArrayDim(1),ArrayDim(2),steer_ang(1),steer_ang(2));
title(sTitle);
set(hFig,'Position',[300 100 800 700]);
