www.gusucode.com > phased 案例源码 matlab代码程序 > phased/AzimuthPatternPlotHeteroULAMultipleFrequenciesExample.m

    %% Azimuth Power Pattern For Two Frequencies
% Create a 5-element hetergeneous ULA from short-dipole antenna elements
% with different axis directions. Draw the azimuth power pattern for the
% horizontal polarization component at 0 degrees elevation for two
% frequencies, 300 MHz and 400 MHz.

% Copyright 2015 The MathWorks, Inc.


%% Construct Heterogeneous ULA
% Construct the array from z-directed and y-directed short dipole 
% antenna elements.
sElement1 = phased.ShortDipoleAntennaElement(...
    'FrequencyRange',[2e8 5e8],...
    'AxisDirection','Z');
sElement2 = phased.ShortDipoleAntennaElement(...
    'FrequencyRange',[2e8 5e8],...
    'AxisDirection','Y');
sArray = phased.HeterogeneousULA(...
    'ElementSet',{sElement1,sElement2},...
    'ElementIndices',[1 2 2 2 1]);

%% Plot the patterns
fc = [300e6 400e6];
c = physconst('LightSpeed');
pattern(sArray,fc,[-180:180],0,...
    'PropagationSpeed',c,...
    'CoordinateSystem','polar',...
    'Type','powerdb',...
    'PlotStyle','overlay',...
    'Polarization','H')