tianxinazhen.txt
来自「好好学习下哈 4个偶极子天线阵的辐射场图 学习啊」· 文本 代码 · 共 26 行
TXT
26 行
clear all
N = 10; d = 0.5; alpha = 2*pi;
dip=[1:N];
kd=2*pi*d;
phi=[0:2*pi/800.1:2*pi];
framemax = 48;
M = moviein(framemax);
set(gcf,'Position',[100 100 640 480])
for n=1:framemax
u=kd*cos(phi)-alpha/framemax*(n-1);
F=abs(sin(N.*u./2+N*1e-15)./sin(u./2+1e-15));
plot(F.*cos(phi),F.*sin(phi),'r','LineWidth',3); %polar(phi,abs(F));
title([ num2str(N),' elements, '... ,num2str(d),' \lambda apart'],'fontsize', 18)
xlabel(['\alpha=' ,num2str(alpha/framemax*(n-1))],'Color','k','fontsize', 18)
hold on
plot(N.*cos(phi),N.*sin(phi),'b','LineWidth',2);
plot(dip-N/2-0.5,dip*0,'o','linewidth',3)
hold off
axis equal
M(:,n) = getframe(gcf);
end
clf
reset
set(gcf,'Position',[100 100 800 600])
axis off
movie(M,1,6)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?