%% Change Number of Summation Terms in Infinite Array
% Create an infinite array with the scan elevation at 45 degrees. Calculate the scan impedance. By default, the number of summation terms used is 21.

h = infiniteArray('ScanElevation',45);
s = impedance(h,1e9)

%
% Change the number of summation terms to 51. Calculate the scan impedance again.

numSummationTerms(h,25)
s = impedance(h,1e9)

%
% Change the number of terms to 101. Increasing the number of summation terms results in a more accurate scan impedance. However, the time required to calculate the scan impedance increases.

numSummationTerms(h,50)
s = impedance(h,1e9)

% Copyright 2015 The MathWorks, Inc.