crosspolarization.m
来自「计算两个互相垂直的电偶极子的交叉激化情况」· M 代码 · 共 26 行
M
26 行
clear all;
Theta=[0.001:0.01:1,1]*pi;
Phi=[0.001:0.01:2,2]*pi;
[theta,phi]=meshgrid(Theta,Phi);
Ea_theta=cos(pi/2*cos(theta))./sin(theta);
maxEa=max(max(Ea_theta));
absEb=cos(pi/2*sin(theta).*cos(phi))./sqrt(1-sin(theta).^2.*cos(phi).^2);
maxEb=max(max(absEb))
Eb_theta=(absEb.*cos(theta)).*cos(phi)./sqrt(1-sin(theta).^2.*cos(phi).^2);
xpol=Ea_theta/maxEa.*Eb_theta/maxEb;
Xpol=20*log10(abs(xpol));
xpol2=cos(theta).*cos(phi)./sqrt(1-sin(theta).^2.*cos(phi).^2);
Xpol2=20*log10(abs(xpol2));
figure(1);
contourf(phi/pi,theta/pi,abs(xpol));
xlabel('\phi/\pi');
ylabel('\theta/\pi');
figure(2);
contourf(phi/pi,theta/pi,Xpol);
xlabel('\phi/\pi');
ylabel('\theta/\pi');
figure(3)
plot3(phi/pi,theta/pi,Xpol);
xlabel('\phi/\pi');
ylabel('\theta/\pi');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?