www.gusucode.com > phased 案例源码 matlab代码程序 > phased/ReducedAzimuthPatternCustomAntennaElementExample.m
%% Reduced Azimuth Pattern of Custom Antenna Element % Create an antenna with a custom response. The user-defined pattern has a % sine pattern in the azimuth direction and a cosine pattern in the % elevation direction. Assume the antenna operates at a frequency of 500 % MHz. Plot an azimuth cut of the directivity of the custom antenna element % at 0 and 30 degrees elevation. Assume the operating frequency is 500 MHz. % Copyright 2015 The MathWorks, Inc. %% % Create the antenna element. fc = 500e6; sCust = phased.CustomAntennaElement; sCust.AzimuthAngles = -180:180; sCust.ElevationAngles = -90:90; sCust.RadiationPattern = mag2db(abs(cosd(sCust.ElevationAngles)'*sind(sCust.AzimuthAngles))); patternAzimuth(sCust,fc,[0 30],... 'Type','powerdb') %% % Plot a reduced range of azimuth angles using the |Azimuth| % parameter. patternAzimuth(sCust,fc,[0 30],'Azimuth',[-45:45],... 'Type','powerdb')