%% Update and Analyze Imported Gerber File
% Create a default PCB stackup definition object.

s = stackUp;

% Import a top layer Gerber file to layer 2.

s.Layer2 = 'patchMicrostripCircular_design_file.gtl';

% Create a PCBReader object using the stackUp object.

p = PCBReader('StackUp',s);

% To update the Gerber file, convert the PCBReader object to a pcbStack object.

p3 = pcbStack(p);

% View the pcbStack object.

figure
show(p3)

% Update the feed diameter.

p3.FeedDiameter = 0.005;

% View the updated pcbStack object.

figure
show(p3)

% Plot the current distribution on the antenna at 2.4 GHz.

figure
current(p3,2.4e9)

% Copyright 2020 The MathWorks, Inc.