%% Create Antenna Model Using Top and Bottom Layer Gerber Files
% Use the gerberRead function to import top and bottom layer Gerber files.

P = gerberRead('antenna_design_file.gtl','antenna_design_file.gbl');

% Display the stack.

P.StackUp

% Modify the third layer in the stack, which is the dielectric layer between the top and bottom metal layers.

S = P.StackUp;
S.Layer3 = dielectric('Name','FR4','EpsilonR', 4.4, 'Thickness', 0.8e-3);
P.StackUp = S;

%  Create the antenna model by calling the pcbStack object on the PCB reader.

pb2 = pcbStack(P);
figure
show(pb2)

% Copyright 2020 The MathWorks, Inc.