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

    %% Add Second Plot to Polar Pattern
% Create a cosine antenna and plot the polar pattern of its directivity at
% 75 MHz.
cosineantenna = phased.CosineAntennaElement('FrequencyRange',[1.0e0 100.0e9],...
    'CosinePower',[2,2]);
p1 = pattern(cosineantenna,75.0e6,[-90:90],0,'Type','Directivity');
P = polarpattern([-90:90],p1);
%%
% Create an isotropic antenna. Calculate the directivity of this antenna at
% 75 MHz.
isoantenna = phased.IsotropicAntennaElement('FrequencyRange',...
    [1.0e0 100.0e9]);
p2 = pattern(isoantenna,75.0e6,[-180:180],0,'Type','Directivity');
%%
% Add the directivity plot of the isotropic antenna to the directivity
% plot of the cosine antenna.
add(P,[-180:180],p2);