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

    %% Plot Azimuth Response of Tapered 11-Element ULA
% This example shows how to
% construct an 11-element ULA array of backbaffled omnidirectional
% microphones for beamforming the direction of arrival of sound
% in air. The elements are spaced four centimeters apart and have
% a frequency response lying in the 2000-8000 Hz frequency range.
% Use the |plotResponse| method to
% display an azimuth cut of the array's response at 5000 Hz.
% Use the |'Weights'| parameter to apply both uniform tapering
% and Taylor window tapering to the array at the same frequency.
% Finally, use the |'AzimuthAngles'| parameter to limit the
% display from -45 to 45 degrees in 0.1 degree increments. A
% typical value
% for the speed of sound in air is 343 meters/second.

% Copyright 2015 The MathWorks, Inc.


s_omni = phased.OmnidirectionalMicrophoneElement(...
    'FrequencyRange',[2000,8000],...
    'BackBaffled',true);
s_ula = phased.ULA(11,'Element',s_omni,...
    'ElementSpacing',0.04);
c = 343.0;
fc = 5000;
wts = taylorwin(11);
plotResponse(s_ula,fc,c,'RespCut','Az',...
    'Format','Polar',...
    'Weights',[ones(11,1),wts],...
    'AzimuthAngles',[-45:.1:45]);
%%
% The plot shows that the Taylor tapered set of weights reduces the
% adjacent sidelobes while broadening the main lobe compared to a
% uniformly tapered array.