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

    %% 3-D Magnitude Pattern of Omnidirectional Microphone
% Construct an omnidirection microphone
% with response in the frequency range 20-20000 Hz. Then, plot the
% 3-D magnitude pattern over a range of angles.

% Copyright 2015 The MathWorks, Inc.


%%
% Construct the microphone element.
sOmin = phased.OmnidirectionalMicrophoneElement(...
    'FrequencyRange',[20 20e3]);
%%
% Plot the 3-D pattern at 500 Hz between -30 to 30 degrees in both azimuth
% and elevation in 0.1 degree increments.
fc = 500;
pattern(sOmin,fc,[-30:0.1:30],[-30:0.1:30],...
    'CoordinateSystem','polar',...
    'Type','efield')