所以我正在研究this paper。我目前正试图在方程式20之后对矩阵进行编码。
我有以下代码:
cx = 1/(1+aprime^2);
cp = 1/period * int(cx*exp(-i*m*K*x),x,0,period);
d_x = aprime/(1+aprime^2);
dp = 1/period * int(d_x*exp(-i*m*K*x),x,0,period);
alpham = (k * sinteta) + m*K;
betam = sqrt((2*pi/lbd)^2 - subs(alpham,m)^2);
beta0 = subs(betam,0);
alpha0 = subs(alpham,0);
for p = -Mmax:Mmax;
for r = -Mmax:Mmax;
A((p+Mmax)+1,(r+Mmax)+1,j) = subs(alpham,r)*subs(dp,m,(p-r));
B(p+Mmax+1,r+Mmax+1,j) = subs(cp,m,p-r);
C(p+Mmax+1,r+Mmax+1,j) = -subs(alpham,p)*subs(alpham,r)*subs(cp,m,p-r) + k^2 * n(j)^2 *kronDel(p,r);
D(p+Mmax+1,r+Mmax+1,j) = subs(alpham,p)*subs(dp,m,p-r);
end
end
T(:,:,j) = [A(:,:,j) , B(:,:,j)
C(:,:,j) , D(:,:,j)];
j是微不足道的,因为我必须为3种不同的媒介做这件事。但我想知道是否有任何明显的错误,因为i)它需要永远基于'aprime'或ii)我最终在矩阵中使用NaN,这不允许我采取eig
目前,aprime为diff(abs(x-.5),x)
thansk寻求帮助!