%% Remove Slivers from Rectangle Shape for Antenna
% Create two rectangle shapes. Change the length and the center of orientation of the second rectangle to the values shown.

rect1 = antenna.Rectangle;
rect2 = antenna.Rectangle;
rect2.Length = 1e-7;
rect2.Center = [0,0.75];

% Add rectangle 1 and rectangle 2.

rect3 = rect1 + rect2
show(rect3)

% Remove slivers.

rect4 = removeSlivers(rect3,1e-6)
show(rect4)

% Copyright 2020 The MathWorks, Inc.