%% Polar Pattern of Cavity Antenna
% Create a default cavity antenna. Calculate the directivity of the antenna and write the data to cavity.pln using the msiwrite function.

c = cavity;
msiwrite(c,2.8e9,'cavity','Name','Cavity Antenna Specifications');

%
% Read the cavity specification file into Horizontal, Vertical, and Optional structures using the msiread function.

[Horizontal,Vertical,Optional] = msiread('cavity.pln')

%
% Plot the polar pattern of the cavity at azimuth angles.

P = polarpattern(Horizontal.Azimuth,Horizontal.Magnitude);

% Copyright 2012 The MathWorks, Inc.