⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basic2.m

📁 计算9格均匀电流面元阵方向图的matlab程序
💻 M
字号:
[theta,phi]=meshgrid([0:0.02*pi:2*pi]);

%E=cos(theta);
the=pi/2-theta;
% E=(cos(3/2*pi*cos(the)))./sin(the);
% E=cos((pi/2)*cos(the))*sin(the);
k=2*pi;
x2=1/6;x1=-1/6;y2=1/6;y1=-1/6;
S=(x2-x1)*(y2-y1);
psi1=k/2*(x2-x1)*sin(the);
psi2=k/2*(y2-y1)*sin(the);
if sin(the)==0
    E=-i*S.*(1+cos(the))/2
elseif sin(phi)==0
    E=-i*S.*(1+cos(the))./2*sin(psi1)./psi1
elseif cos(phi)==0
    E=-i*S.*(1+cos(the))./2*sin(psi2)./psi2
else
E=i*cellfac(x1,x2,y1,y2,the,phi).*(1+cos(the))./(k*sin(the).*cos(phi))./(k*sin(the).*sin(phi));
end
[x,y,z]=sph2cart(phi,theta,abs(E)/max(max(abs(E))));
mesh(x,y,z)%'EdgeColor','black'
axis off

⌨️ 快捷键说明

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