%% Find Lobes in Two Data Sets
% Create a helix antenna that has a 28 mm radius, a 1.2 mm width, and 4 turns. Calculate and plot the directivity of the antenna at 1.8 GHz.

hx = helix('Radius',28e-3,'Width',1.2e-3,'Turns',4);
H = pattern(hx, 1.8e9,0,0:1:360);
P = polarpattern(H);

%
% Create a dipole antenna and calculate the directivity at 270 MHz.

d = dipole;
D = pattern(d,270e6,0,0:1:360);

%
% Add the directivity of the dipole to the existing polar plot.

add(P,D);

%
% Find the main, back, and side lobes of helix antenna.

L = findLobes(P,1)

% Copyright 2012 The MathWorks, Inc.