www.pudn.com > antennas-and-radio-wave-propagation.rar > 对称振子方向图.m, change:2002-01-01,size:537b


%对称振子方向图 
clear; 
clc; 
m=moviein(30); 
for i=1:30; 
sita=meshgrid(eps:pi/180:pi); 
fai=meshgrid(eps:2*pi/180:2*pi)'; 
deta=eps:2*pi/180:2*pi; 
l=i*0.05; 
t=i*0.05; 
r=abs(cos(2.*pi.*l.*cos(sita))-cos(2*pi*l))./(sin(sita)+eps); 
rmax=max(max(r)); 
[x,y,z]=sph2cart(fai,pi/2-sita,r/rmax); 
subplot(1,2,1);mesh(x,y,z);title('对称振子立体方向图'); 
f=abs((cos(2*pi*t*cos(deta))-cos(2*pi*t))./(sin(deta)+eps)); 
fmax=max(max(f)); 
subplot(1,2,2);polar(pi/2-deta,f/fmax);title('对称振子E面方向图'); 
m(:,i)=getframe; 
end; 
movie(m,1);