CLC
Close all
Clear all
% parameter Settings
Lambda=0.1;
K=2 * PI/lambda;
Dz=lambda/2;
Dy=lambda/2;
M=(5, 0];
N=(8, 0), % % % % % % % % modify
Theta=linspace (- 90,90,181) * PI/180;
Phi=linspace (- 90,90,181) * PI/180;
% beam-pointing
Theta_0=60;
Phi_0=20.
Theta_d=theta_0 * PI/180;
Phi_d=phi_0 * PI/180;
Alpha dy=k * * cos (theta_d) * sin (phi_d);
Dz beta=k * * sin (theta_d);
% pattern calculation
For u=1: length (theta)
For v=1: length (phi)
For n=1: n (1, 1)
For m=1: m (1, 1)
A1 (m)=exp (1 I * (n - 1) * (k * dy * cos (theta (u)) * sin (phi) (v) - alpha));
A2 (m)=exp (1 I * (m - 1) * (k * dz * sin (theta (u)) - beta));
A (m)=a1 a2 (m) * (m);
End
B (n)=sum (a);
End
P (u, v)=sum (b);
End
End
P=20 * log10 (abs (P)/abs (Max (Max (P))));
% drawingMesh (P);
Xlabel (' azimuth/Phi);
Ylabel (' pitching Angle/Theta);
Title (' uniform array direction of 3 d map).
Figure
F=P (theta_0 + 90 + 1, :);
Subplot (2, 2, 1)
The plot (phi * 180/PI, f);
Ylim ([- 50, 0]);
Above is a Duan Cheng matlab, in VS by calling matlab engine, the method of modify the program of M and N values