www.gusucode.com > phased 案例源码 matlab代码程序 > phased/PlotConvertedRadiationPatternPhiTheta2UVExample.m
%% Convert and Plot Radiation Pattern % Convert a radiation pattern to $u-v$ coordinates, with the $u$ and $v$ coordinates % spaced by 0.01. % Copyright 2015 The MathWorks, Inc. %% % Define the pattern in terms of $\phi$ and $\theta$. phi = 0:360; theta = 0:90; pat_phitheta = mag2db(repmat(cosd(theta)',1,numel(phi))); %% % Convert the pattern to $u-v$ coordinates. Store the $u$ and $v$ coordinates % for use in plotting. [pat_uv,u,v] = phitheta2uvpat(pat_phitheta,phi,theta); %% % Plot the result. H = surf(u,v,pat_uv); H.LineStyle = 'none'; xlabel('u'); ylabel('v'); zlabel('Pattern');