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

    %% Azimuth Pattern of Omnidirectional Microphone Element
% Create an omnidirectional microphone element. Plot an azimuth cut of the
% directivity at 0 and 30 degrees elevation. Assume an operating frequency
% of 500 Hz.

% Copyright 2015 The MathWorks, Inc.


%%
% Create the microphone element.
sOmni = phased.OmnidirectionalMicrophoneElement('FrequencyRange',[100,900]);
fc = 500;
%%
% Plot the azimuth pattern.
patternAzimuth(sOmni,fc,[0 30])

%%
% Because of the omnidirectionality of the microphone, the two patterns
% coincide.
%%
% Plot a reduced range of azimuth angles using the |Azimuth|
% parameter.
patternAzimuth(sOmni,fc,[0 30],'Azimuth',[-20:20])