?? array.m
字號(hào):
clear allN = 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:framemaxu=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 onplot(N.*cos(phi),N.*sin(phi),'b','LineWidth',2);plot(dip-N/2-0.5,dip*0,'o','linewidth',3)hold offaxis equalM(:,n) = getframe(gcf);endclf resetset(gcf,'Position',[100 100 800 600])axis offmovie(M,1,6)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -