Home > database >  New consult Matlab programming code to simulate the beam
New consult Matlab programming code to simulate the beam

Time:09-16

CLC
Clear all
Close all
M=7.
Lambda=5.32 e-4;
K=2 * PI/lambda;
Send lambda=10 *;
Settlement z0=k * ^ 2/2;
Z=0 * z0;
Q=1 + I * z/z0;
A=1/(10 * lambda);
C=10;
N=3;
Fai=0-2 * PI;
A1=0.02;
X=linspace (a1, a1, M);
Y=linspace (a1, a1, M);
(x1, y1)=meshgrid (x, y);
[theta, r]=cart2pol (x1, y1);
Xx=1./q. * SQRT (a * r. * (2 * a * r - c * q * exp (I * theta)));
(I=1./q. * a * r)/(2 * a * r - c * q * exp (I * theta)))) ^ n. * besselj (n, xx). * besselj (n, xx).
En=i. ^ (1/2). * cos (fai);
Figure (471)
Mesh (abs (En). ^ 2), view (2)
Ph=Angle (En);
Figure (288)
Imshow (ph, [])
  • Related