slabexec.m

来自「matlab例程」· M 代码 · 共 39 行

M
39
字号
disp('Finds TE or TM modes approx field patterns in slab guides.');
disp('30 or more layers are possible with complex permittivity');
disp('gain guiding can be modelled but is more limited than index guiding');

p1new;% asks about new data;

quit='n';
if new=='y';
   bragg='n'; %default calculation does not do bragg grating  
   p2thick;% enter layer thicknesses;
   
   if (quit=='q'<1);
      p3refind;% enter real refractive indices;
   end;
   
   if (quit=='q'<1);
      p4gain;% enter gains/losses;
   end;
   
   if (quit=='q'<1); 
      p5layer; %plots layers and refractive index; divides into thinner layers
      p6bragg; % enter bragg grating parameters if there is a bragg grating;
   end;  
   
   if (quit=='q'<1);
      p7layer; % re-determines fine layers when Bragg grating presnt 
   end;
   
end;

if (quit=='q'<1);
   p8calc; % main calculation
end;

FH=gcf;
figure(FH-2*(MN1-1));pause(3)
figure(FH-2*(MN1-1)-1);
disp('SEE OTHER FIGURES IF PRESENT FOR HIGHER ORDER MODES');
%end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?