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
NoOfTxAntenna = 32
txarray = phased.ULA('NumElements',NoOfTxAntenna,'ElementSpacing',lambda/2);
hFig = figure(1);
pattern(txarray,fc,[180:180],[90:90],...
'PropagationSpeed',c,...
'CoordinateSystem','polar',...
'Type','powerdb')
set(gcf,'color','w');
view(135,15);
sTitle = sprintf("Antenna Array = %d by %d, Steering Angle=[%d %d]",1,NoOfTxAntenna,0,0);
title(sTitle);
set(hFig,'Position',[300 100 800 700]);
set(hFig,'Position',[300 300 780 300]);
