dipole.m

来自「Calculate the field distribution of Hert」· M 代码 · 共 32 行

M
32
字号
n=2*pi; d=n/50+0.001; [x,y] = meshgrid(-n:d:n,-n:d:n);          nn=30         j=0;           M = moviein(nn);          for j=1:nn z=(x./sqrt(x.^2+y.^2)).^2.*(... -sin(sqrt(x.^2+y.^2)-j*2*pi/nn)... -cos(sqrt(x.^2+y.^2)-j*2*pi/nn)./sqrt(x.^2+y.^2)... ); v=[-1 -0.9 -0.8 -0.75 -0.5 -0.25 -0.1 -0.05 0 0.05 0.1 0.25 0.5 ...0.75 0.8 0.9 1];%v=[ -0.75 -0.5 -0.25 0 0.25 0.5 0.75 ]; contour(z,v);%contour(z,30);%colorbaraxis equal%grid on          M(:,j) = getframe;         end         movie(M,100,10)         

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?