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

📄 tes.m

📁 this code for qpsk with awgn
💻 M
字号:
clear;clf;
small=1e-8;
d_script_L_over_lam=0.12;
d_over_lam=1/0.88;n=5;alpha_rad=pi/12;
theta_deg=small:1:180-small;
theta_rad=theta_deg*pi/180;
phi_deg=small:1:360-small;
phi_rad=phi_deg*pi/180;
[theta_rad_2D,phi_rad_2D]=meshgrid(theta_rad,phi_rad);
f_not_normalized_unit=sin(theta_rad_2D);
f_normalized_unit=f_not_normalized_unit/max(max(f_not_normalized_unit));
Psi=2*pi*d_over_lam*cos(phi_rad_2D).*sin(theta_rad_2D)+alpha_rad;
f_not_normalized_array=sin(n*Psi/2)./sin(Psi/2);
f_not_normalized=f_not_normalized_unit.*f_not_normalized_array;
f_normalized=f_not_normalized/max(max(f_not_normalized));
%Look at Unit Pattern:
[x_unit,y_unit,z_unit]=...
    sph2cart(phi_rad_2D,(pi/2-theta_rad_2D),f_normalized_unit);
surface(x_unit,y_unit,z_unit,'FaceColor','red','EdgeColor','none');
camlight left;
lighting phong;
view(20,30);
title('Unit Field Pattern for Linear Array of Hertzian Dipoles');
xlabel('x (Dimensionless)');
ylabel('y (Dimensionless)');
zlabel('z (Dimensionless)');
pause;
%Look at Total Pattern:
clf;
[x,y,z]=sph2cart(phi_rad_2D,(pi/2-theta_rad_2D),f_normalized);
surface(x,y,z,'FaceColor','red','EdgeColor','none');
camlight left;
lighting phong;
view(20,30);
title('Field Pattern for Linear Array of Hertzian Dipoles');
xlabel('x (Dimensionless)');
ylabel('y (Dimensionless)');
zlabel('z (Dimensionless)');
pause;
view(0,0);
pause;
view(0,90);
pause;
view(90,0);

⌨️ 快捷键说明

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