%% End Loaded Planar Dipole
% Setup parameters.

vp  = physconst('lightspeed');
f   = 850e6;
lambda = vp./f;

%
% Build a planar dipole with capacitive loading at the ends.

L = 0.15;
W = 1.5*L;
stripL = L;
gapx = .015;
gapy = .01;
r1 = antenna.Rectangle('Center',[0,0],'Length',L,'Width',W,'Center',[lambda*0.35,0]);
r2 = antenna.Rectangle('Center',[0,0],'Length',L,'Width',W,'Center',[-lambda*0.35,0]);
r3 = antenna.Rectangle('Length',0.5*lambda,'Width',0.02*lambda,'NumPoints',2);
s = r1 + r2 + r3;
figure
show(s)

%
% Assign the radiator shape to pcbStack and make the changes to the board shape and feed diameter properties.

boardShape = antenna.Rectangle('Length',0.6,'Width',0.3);
p = pcbStack;
p.BoardShape = boardShape;
p.Layers = {s};
p.FeedDiameter = .02*lambda/2;
p.FeedLocations = [0 0 1];
figure
show(p)

%
% Analyze the impedance of the antenna. Effect of the end-loading should result in the series resonance to be pushed lower in the band.

figure
impedance(p,linspace(200e6,1e9,51))

% Copyright 2012 The MathWorks, Inc.