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

    %% Azimuth Pattern of Array with Subarrays
% Create a 2-element ULA of isotropic antenna elements, and arrange three
% copies to form a 6-element ULA. Plot the directivity azimuth pattern
% within a restricted range of azimuth angles from -30 to 30 degrees in 0.1
% degree increments. Plot directivity for 0 degrees and 45 degrees
% elevation.

% Copyright 2015 The MathWorks, Inc.


%% Create the array
fmin = 1e9;
fmax = 6e9;
c = physconst('LightSpeed');
lam = c/fmax;
sIso = phased.IsotropicAntennaElement(...
    'FrequencyRange',[fmin,fmax],...
    'BackBaffled',false);
sULA = phased.ULA('Element',sIso,...
    'NumElements',2,'ElementSpacing',0.5);
sRS = phased.ReplicatedSubarray('Subarray',sULA,...
    'Layout','Rectangular','GridSize',[1 3],...
    'GridSpacing','Auto');
%% Plot azimuth directivity pattern
fc = 1e9;
wts = [0.862,1.23,0.862]';
patternAzimuth(sRS,fc,[0,45],'PropagationSpeed',physconst('LightSpeed'),...
    'Azimuth',[-30:0.1:30],...
    'Type','directivity',...
    'Weights',wts);