Code covered by the BSD License  

Highlights from
Interactive Simulation Toolbox for Optics

image thumbnail

Interactive Simulation Toolbox for Optics

by

 

30 Jan 2013 (Updated )

2-dimensional FDTD-Toolbox (Yee Grid,Matrix based,current like sources,PML boundaries, GUI based)

B=pmlerw(M,w)
function B=pmlerw(M,w)
[ly,lx]=size(M);

B=zeros(ly+2*w,lx+2*w);
for i=1:w
B(w+1:end-w,i)=M(:,1);
B(w+1:end-w,end-w+i)=M(:,end);
end
B(w+1:end-w,w+1:end-w)=M;
for i=1:w
B(i,:)=B(w+1,:);
B(end-w+i,:)=B(end-w-1,:);
end
B(w+1:end-w,w+1:end-w)=M;

Contact us