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

    %% Power Pattern of Cardioid Microphone in U/V Space
% Plot a $u$-cut of the power pattern of a custom cardioid microphone
% designed to operate in the frequency range 500-1000 Hz.

% Copyright 2015 The MathWorks, Inc.


%%
% Create a cardioid microphone.
sCustMike = phased.CustomMicrophoneElement;
sCustMike.PolarPatternFrequencies = [500 1000];
sCustMike.PolarPattern = mag2db([...
    0.5+0.5*cosd(sCustMike.PolarPatternAngles);...
    0.6+0.4*cosd(sCustMike.PolarPatternAngles)]);
%%
% Plot the power pattern.
fc = 500;
pattern(sCustMike,fc,[-1:.01:1],0,...
    'CoordinateSystem','uv',...
    'Type','powerdb');