123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- function [kz1, kz2, kx, kxy] = fmm_kxz(no, kx0, ky0, kg, eps1, eps2)
- ind = linspace(1,no,no);
- kx = kx0 + kg*(ind - ceil(no/2));
- kxy = kx.^2 + ky0^2;
- kz1 = sqrt(eps1 - kxy);
- kz2 = sqrt(eps2 - kxy);
- ind = angle(kz1) < -1e-12;
- kz1(ind) = -kz1(ind);
- ind = angle(kz2) < -1e-12;
- kz2(ind) = -kz2(ind);
- kxy = sqrt(kxy);
- end
|