📄 squarepixel_toeplitz_1d.asv
字号:
%SquarePixel_Toeplitz_1D.m
%Purpose: Construct the Toeplitz matrix of 1D ebxn with Square pixels
%Ref:Linfang Shen, Sailing He, and Sanshui Xiao, Large absolute band gaps
%in one-dimensional photonic crystals formed by large dielectric pixels,
%Physical Review B 66, 165315-1->-6 (2002)
function [tp,sig]=SquarePixel_Toeplitz_1D(ebxn,pw,M,flag)
%ebxn=The first quadrant of 2D permittivity with Square pixels
%pw=width of each pixel
%M=maximal half order number of Fourier coefficients
%flag=1:Laurent's rule;
%flag=2:inverse rule for x;
t=size(ebxn);
if min(t)~=1
sig=-1;
tp='ebxn is not one dimension';
return;
end
cw=2*t(1)*pw;
N=2*M+1;
tp=zeros(N);
Sr=zeros(1,N);
Sc=zeros(1,N);
if flag==1
ebxn1=ebxn;
else
ebxn1=1./ebxn;
end
for m=0:-1:-2*M
Sr(1-m)=SquarePixel_ebxn_1D_FC(ebxn1,pw,m);
end
for m=0:2*M
Sc(1+m)=SquarePixel_ebxn_1D_FC(ebxn1,pw,m);
end
if flag==1
tp=toeplitz(Sc,Sr);
else
tp=inv(toeplitz(Src,Srr));
end
sig=1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -