12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- function [SMD] = calc_SMD_layer_td(xno, yno, kx0, ky0, kgx, kgy, kh, eps)
- no = xno*yno;
- SMD = zeros(2*no,2,2);
-
- kx = kx0 + kgx*(linspace(1,xno,xno) - ceil(xno/2));
- ky = ky0 + kgy*(linspace(1,yno,yno) - ceil(yno/2));
- [kkx,kky] = meshgrid(kx,ky);
- kkx = reshape(kkx,1,[]);
- kky = reshape(kky,1,[]);
- kkxy = kkx.^2 + kky.^2;
-
- kz = sqrt(eps - kkxy);
- ind = angle(kz) < -1e-12;
- kz(ind) = -kz(ind);
-
- SMD(:,2,1) = exp((1i*kh)*kz);
- SMD(:,1,2) = SMD(:,2,1);
- end
|