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

    %% Plot 3-D Response of Omnidirectional Microphone
% This example shows how to construct an omnidirection microphone
% with response in the frequency range 20 - 20000 Hz and how to plot its
% 3-D response over a range of angles.

% Copyright 2015 The MathWorks, Inc.


%%
% Construct the microphone element.
sOmin = phased.OmnidirectionalMicrophoneElement(...
    'FrequencyRange',[20 20e3]);

%%
% Plot the 3-D response at 500 Hz. Show the response between -30
% to 30 degrees in both azimuth and elevation in 0.1 degree increments.
plotResponse(sOmin,500,'Format','Polar',...
    'RespCut','3D','Unit','mag',...
    'AzimuthAngles',[-30:0.1:30],...
    'ElevationAngles',[-30:0.1:30]);