%% Replace Polar Plot Data with New Data
% Create a helix antenna that has a 28 mm radius, a 1.2 mm width, and 4 turns. Calculate 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);

%
% Plot the polar pattern.

P = polarpattern(H);

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

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

%
% Replace the existing polar plot of the helix antenna with the directivity of the dipole.

replace(P,D);

% Copyright 2012 The MathWorks, Inc.