📄 gerpw.m
字号:
function field=gerPW(k,order,RoW,W,L)
% function field=gerPW(k,order,RoW,W,L)
% yhwsoft 2005.4.25
O=[W/4, L/2];
field=zeros(W,L);
for w=1:W,
for l=1:L
rr=sqrt(((w-O(1))*RoW)^2+((l-O(2))*RoW)^2);
theta=pi-angle((w-O(1))*RoW+(l-O(2))*RoW*i);
if order==1
tt=1;
t=cos(theta);
end
rho=1*k*rr;
if rho<eps
rho=eps;
end
preX=[t*besselh(order,1,rho),
t*besselh(order,2,rho),
tt*(besselh(order,1,rho)/rho+order/(2*order+1)*besselh(order-1,1,rho)-(order+1)/(2*order+1)*besselh(order+1,1,rho)),
tt*(besselh(order,2,rho)/rho+order/(2*order+1)*besselh(order-1,2,rho)-(order+1)/(2*order+1)*besselh(order+1,2,rho))
];
En=i^order*(2*order+1)/order/(order+1);
field(w,l)=-En*sin(pi/2)*[1/2 1/2 -i/2 -i/2]*preX;
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -