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

    %% Azimuth Directivity of Heterogeneous URA
% Construct a square 4-by-4 heterogeneous URA composed of a mix of
% crossed-dipole and short-dipole antenna elements with short dipoles in
% the center. Plot the array azimuth directivity for two different
% elevation angles. Set the operating frequency to 400 MHz.

% Copyright 2015 The MathWorks, Inc.


%%
sElement1 = phased.CrossedDipoleAntennaElement(...
    'FrequencyRange',[200e6 500e6]);
sElement2 = phased.ShortDipoleAntennaElement(...
    'FrequencyRange',[200e6 500e6],...
    'AxisDirection','Z');
elemindices = ones(4,4);
elemindices(2:3,2:3) = 2;
sArray = phased.HeterogeneousURA(...
    'ElementSet',{sElement1,sElement2},...
    'ElementIndices',elemindices);
fc = 400e6;
c = physconst('LightSpeed');
patternAzimuth(sArray,fc,[0 30],...
    'PropagationSpeed',c,...
    'Type','directivity')