www.gusucode.com > phased 案例源码 matlab代码程序 > phased/Response2SetsWeightsSingleFrequencyExample.m
%% Apply Two Sets of Weights at a Single Frequency % Construct an array of replicated subarrays. Start with a 2-element uniform % line array (ULA), and duplicate it 5 times to create a 10-element ULA. % Apply both uniform weights and tapered weights. Then, use |plotResponse| % to show that the tapered set of weights reduces the adjacent sidelobes % while broadening the main lobe. % Copyright 2015 The MathWorks, Inc. h = phased.ULA('NumElements',2,'ElementSpacing',0.2); ha = phased.ReplicatedSubarray('Subarray',h,... 'Layout','Rectangular','GridSize',[1 5],... 'GridSpacing',0.4); c = physconst('LightSpeed'); fc = 1e9; wts1 = [0.2,0.2,0.2,0.2,0.2]'; wts2 = [0.1,0.23333,.33333,0.23333,0.1]'; plotResponse(ha,fc,c,'RespCut','Az','Format','Polar',... 'Weights',[wts1,wts2]);