%% Scan Impedance of Infinite Array
% Calculate the scan impedance of an infinite array at 1GHz. To calculate the impedance, scan the infinite array from boresight to horizon in the elevation plane.

infa = infiniteArray;
theta0deg = linspace(0,90,5);
zscan = nan(1,numel(theta0deg));    
    for j = 1:numel(theta0deg)
      infa.ScanElevation = theta0deg(j);
      zscan(1,j) = impedance(infa,1e9);
    end
 plot(zscan)

% Copyright 2015 The MathWorks, Inc.