www.gusucode.com > phased 案例源码 matlab代码程序 > phased/PlotofConvertedRadiationPatternExample.m
%% Plot Converted Radiation Pattern % Plot the result of converting a radiation pattern to $\phi/\theta$ space with the % $\phi$ and $\theta$ angles spaced 1 degree apart. % Copyright 2015 The MathWorks, Inc. %% % The radiation pattern is the cosine of the elevation. az = -180:180; el = -90:90; pat_azel = repmat(cosd(el)',1,numel(az)); %% % Convert the pattern to $\phi/\theta$ space. Use the returned $\phi$ and $\theta$ angles for plotting. [pat_phitheta,phi,theta] = azel2phithetapat(pat_azel,az,el); %% % Plot the result. H = surf(phi,theta,mag2db(pat_phitheta)); H.LineStyle = 'none'; xlabel('phi (degrees)'); ylabel('theta (degrees)'); zlabel('Pattern');