www.gusucode.com > phased 案例源码 matlab代码程序 > phased/MagnitudeAndDirectivityPatternsOmnidirectionalMicrophoneExample.m
%% Magnitude and Directivity Patterns of Omnidirectional Microphone % Construct an omnidirectional microphone % and plot the magnitude and directivity patterns. The microphone % operating frequency spans the range 20 to 20000 Hz. % %% % Construct the omnidirectional microphone. % Copyright 2015 The MathWorks, Inc. sOmni = phased.OmnidirectionalMicrophoneElement(... 'FrequencyRange',[20 20e3]); %% % Plot the microphone magnitude pattern at 200 Hz. fc = 200; pattern(sOmni,fc,[-180:180],0,... 'CoordinateSystem','rectangular',... 'Type','efield') %% % Plot the microphone directivity. pattern(sOmni,fc,[-180:180],0,... 'CoordinateSystem','rectangular',... 'Type','directivity') %% % The directivity is 0 dbi as expected for an omnidimensional element.